You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move StenoIO into Steno namespace as Steno::LoggerIO (#4905)
- Add Steno::LoggerIO: IO adapter wrapping Steno::Logger, forwarding
write/puts to the logger at a configured log level
- Add tests for Steno::LoggerIO
- Remove StenoIO and its spec
- Update Steno::Logger: broaden callstack filter from logger.rb only to
all frames within lib/steno/, so records logged via Steno::LoggerIO
are attributed to the correct caller
- Update PumaRunner to use Steno::LoggerIO instead of StenoIO
- Update lib/steno/README.md: document changes as modification #8
- All log levels including debug1, debug2 - debug2 is actively used
122
122
123
+
### 8. LoggerIO Adapter for Puma Integration
124
+
**Rationale**: `Puma::LogWriter` requires IO-compatible objects. Previously, a `StenoIO` class existed outside the Steno library to bridge this gap. Since Steno is now inlined, the adapter was moved into the Steno namespace for consistency.
125
+
126
+
**Added**:
127
+
-`lib/steno/logger_io.rb`: `Steno::LoggerIO` - an IO adapter that wraps a `Steno::Logger` and forwards `write`/`puts` calls to it at a configured log level. Used by `PumaRunner` to pass Steno loggers as IO objects to `Puma::LogWriter`.
128
+
-`spec/isolated_specs/steno/unit/logger_io_spec.rb`: Tests for `Steno::LoggerIO`.
129
+
130
+
**Modified**:
131
+
-`lib/steno/logger.rb`: Broadened the callstack filter from removing only frames from `logger.rb` to removing all frames within `lib/steno/`. This ensures that log records originating via `Steno::LoggerIO` correctly attribute the source location to the caller rather than to the adapter itself.
132
+
123
133
---
124
134
125
135
## Making Future Modifications
@@ -129,7 +139,7 @@ If you modify this integrated steno library:
129
139
1.**Document changes** in the "Modifications Made After Integration" section above
130
140
2.**Include rationale** for why the change was made
131
141
3.**List affected files** and what changed
132
-
4.**Run tests** to ensure nothing breaks: `bundle exec rspec spec/unit/lib/steno/`
142
+
4.**Run tests** to ensure nothing breaks: `bundle exec rspec spec/isolated_specs/steno/`
133
143
5.**Update this README** in the same commit as your changes
0 commit comments