Commit 87bd15d
Restore log level functionality with LOG_LEVEL_V2 support (#23)
* Update protobuf
* Restore log level functionality with LOG_LEVEL_V2 support
- Add Reforge::LogLevel enum for public API (:trace, :debug, :info, :warn, :error, :fatal)
- Add Reforge::LogLevelClient with getLogLevel, should_log?, and semantic_filter methods
- Add logger_key option to Reforge::Options (defaults to 'log-levels.default')
- Implement LOG_LEVEL_V2 config evaluation with "reforge-sdk-logging" context
- Add SemanticLogger integration support for dynamic log level filtering
- Add comprehensive test coverage (12 tests, 35 assertions)
- Update README with SemanticLogger integration documentation
- Include protobuf update from previous commit
This implementation differs from the predecessor by using a single LOG_LEVEL_V2
config evaluation rather than walking up a tree of logger names, providing a
simpler and more explicit approach to log level management.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove ruby 3.1 from test matrix -- its end of life
* Make logger dependencies optional and add stdlib Logger support
- Move semantic_logger from runtime to development dependency
- Make semantic_logger optional with graceful fallback
- Add stdlib Logger integration via stdlib_formatter method
- Update README with stdlib Logger documentation
- Improves flexibility for customer integration by removing required dependencies
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Make InternalLogger work without SemanticLogger dependency
- Change InternalLogger to check if SemanticLogger is defined
- Fall back to stdlib Logger when SemanticLogger is not available
- Preserve all original functionality for SemanticLogger users
- Add support for trace, debug, info, warn, error, fatal methods
- Update gemspec to include internal_logger.rb
Fixes CI test failures where SemanticLogger is not installed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Make test helpers and Reforge.log_filter work without SemanticLogger
- Add SemanticLogger check in common_helpers setup
- Make Reforge.log_filter gracefully handle missing SemanticLogger
- Make bootstrap_log_level return true when SemanticLogger unavailable
- Add warning message when log_filter used without SemanticLogger
Fixes test failures when SemanticLogger is not installed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add level getter and fix InternalLogger output for tests
- Add level getter method that returns symbol for both SemanticLogger and stdlib Logger
- Make stdlib Logger output dynamically check for $logs (test environment)
- Ensures logs go to $logs during tests instead of only $stderr
- Fixes test failures where assert_logged expects logs in $logs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix stdlib Logger formatting and log filter warnings for CI tests
- Add custom formatter to stdlib Logger that mimics SemanticLogger format
- Remove SemanticLogger check from using_reforge_log_filter! to work with both logger types
- Track all InternalLogger instances regardless of logger type
- Change log_filter warning from WARN to DEBUG level (optional dependency shouldn't warn)
- Formatter outputs "ClassName -- Message" to match test expectations
Fixes CI test failures with unexpected log formats and warnings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix stdlib Logger level tracking and prevent log flooding in CI
- Add @level_sym instance variable to track exact symbol level (including :trace)
- Fix level getter to return tracked symbol for stdlib Logger (preserves :trace vs :debug distinction)
- Make using_reforge_log_filter! less aggressive for stdlib Logger (stays at :warn instead of :trace)
- Initialize @level_sym properly in create_stdlib_logger
- Prevents debug/info log flooding in CI tests where SemanticLogger is not available
With SemanticLogger, semantic filter controls output at :trace level.
Without SemanticLogger, keeping level at :warn prevents excessive logs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update test_internal_logger to handle optional SemanticLogger
- Test now checks if SemanticLogger is defined
- With SemanticLogger: expects :trace level after using_reforge_log_filter!
- Without SemanticLogger: expects :warn level (to prevent log flooding)
- Matches the actual behavior of InternalLogger
Fixes CI test failure where SemanticLogger is not available.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Move semantic_logger to test group and simplify stdlib Logger output
- Move semantic_logger from development to test group in Gemfile
- stdlib Logger now always writes to $stderr (not $logs)
- Tests use $logs for SemanticLogger-filtered output only
- Restore using_reforge_log_filter! to always set :trace level
- Restore test to always expect :trace after calling using_reforge_log_filter!
This allows local testing with SemanticLogger while CI can test without it.
stdlib Logger logs go to $stderr and won't appear as unexpected in $logs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Bump version to 1.12.0
Release includes restored log level functionality with support for both SemanticLogger and stdlib Logger.
Changes:
- Restore log level functionality with LOG_LEVEL_V2 support
- Make SemanticLogger optional - SDK now works with or without it
- Add stdlib Logger support as alternative to SemanticLogger
- Add InternalLogger that automatically uses SemanticLogger or stdlib Logger
- Add logger_key initialization option for configuring dynamic log levels
- Add stdlib_formatter method for stdlib Logger integration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 21c7bfa commit 87bd15d
File tree
17 files changed
+779
-32
lines changed- .github/workflows
- lib
- reforge
- test
- support
17 files changed
+779
-32
lines changedBinary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 | | |
4 | 13 | | |
5 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
68 | 168 | | |
69 | 169 | | |
70 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | | - | |
6 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
7 | 20 | | |
8 | 21 | | |
9 | 22 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
17 | 61 | | |
18 | 62 | | |
19 | 63 | | |
20 | | - | |
21 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
22 | 81 | | |
23 | 82 | | |
24 | 83 | | |
25 | 84 | | |
26 | 85 | | |
27 | 86 | | |
28 | | - | |
29 | | - | |
| 87 | + | |
| 88 | + | |
30 | 89 | | |
31 | 90 | | |
32 | 91 | | |
33 | 92 | | |
34 | 93 | | |
35 | | - | |
36 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
37 | 157 | | |
38 | 158 | | |
39 | | - | |
40 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
41 | 171 | | |
42 | 172 | | |
43 | 173 | | |
0 commit comments