Repository navigation
Releases
Releases · angryboat/slog-lambda
Release v1.3.0
Immutable
release. Only release title and notes can be modified.
What's Changed
⚠️ Module path moved
The module is now github.com/angryboat/slog-lambda. Update your imports:
-import sloglambda "github.com/maddiesch/slog-lambda"
+import sloglambda "github.com/angryboat/slog-lambda"Features
WithFunctionName()andWithFunctionVersion()options override the function name and version that are otherwise read from the Lambda environment- Function name and version are now read from the environment once in
NewHandlerinstead of on every log call
Performance
- Records are appended directly to a pooled byte buffer, mirroring
slog.JSONHandler, instead of building an intermediate map - The
WithAttrs/WithGroupchain is pre-serialized once, soHandlecopies bytes instead of re-walking the chain per record - JSON output now uses stdlib field order:
time,level,source,msg,type,record, then attrs in call order
Bug Fixes
- A value that fails to JSON-encode no longer drops the whole log record; it's written as an
!ERROR:<msg>string in place json.Marshaleroutput is embedded verbatim (compacted) instead of double-encoded, and quoted in text format when needed- User attrs named
recordortypeno longer clobber the handler's keys; they're renamed torecord_/type_without overwriting an existing fallback key - A nil
fmt.Stringerno longer panics in text mode WithLevel(nil)is treated as INFO instead of panicking on the first log call- Text keys and non-string values are quoted when needed, including the DEL byte
- Nested empty groups are omitted, per
slogtest - Unnamed
LogValuers are resolved once, and empty groups are ignored when scanning for reserved-key collisions - Oversized prefix buffers are kept out of the state pool
Documentation
- Documented Lambda key conventions, level suffixes, and reserved-key rename edge cases
- Refreshed README and CLAUDE.md
CI
- Test matrix covers Go 1.25, 1.26, 1.27, and stable on Linux x64 and arm64
- GitHub Actions bumped to current majors, with Dependabot keeping them updated
- Release workflow validates the version input and pins gosec
- Bumped testify to v1.12.1
Full Changelog: v1.2.1...v1.3.0
Release v1.2.1
What's Changed
Bug Fixes
- Fixed
slog.Grouphandling —normalizeValuenow correctly processesKindGroupvalues instead of falling through toKindAny, fixing attribute grouping behavior (#6) - Fixed
LogValuerresolution — deferredLogValuerresolution fromlogRecord.appendtonormalizeValue, ensuring values are resolved at the correct stage (#5) - Removed panic on unknown value kinds — the handler now falls back to
String()instead of panicking on unrecognizedslog.Valuekinds (#6)
Dependencies
- Updated Go from 1.24 to 1.25
- Updated
aws-lambda-gofrom v1.49.0 to v1.50.0 - Added
stretchr/testifyandgoleakfor improved testing
Documentation
- Improved package-level and exported API doc comments
- Expanded README with usage examples
- Updated CLAUDE.md
CI/CD
- Split PR-required checks into a dedicated CI workflow (#7)
- Updated GitHub Actions (#8)
- Release workflow now requires CI & Go checks to pass (#9)
- Fixed concurrent run keys in release workflow (#11)
Testing
- Added
slogtest.Runconformance tests for both JSON and text formats - Added internal tests for level parsing, level strings,
logRecordoperations, text serialization, and value normalization - Added goroutine leak detection with
goleak - Added tests for
LogValuerresolution and complex types likehttp.Request
Full Changelog: maddiesch/slog-lambda@v1.2.0...v1.2.1