Skip to content

Releases

Release v1.3.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 06:40
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() and WithFunctionVersion() 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 NewHandler instead 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/WithGroup chain is pre-serialized once, so Handle copies 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.Marshaler output is embedded verbatim (compacted) instead of double-encoded, and quoted in text format when needed
  • User attrs named record or type no longer clobber the handler's keys; they're renamed to record_/type_ without overwriting an existing fallback key
  • A nil fmt.Stringer no 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

Choose a tag to compare

@maddiesch maddiesch released this 17 Oct 04:35
93555af

What's Changed

Bug Fixes

  • Fixed slog.Group handling — normalizeValue now correctly processes KindGroup values instead of falling through to KindAny, fixing attribute grouping behavior (#6)
  • Fixed LogValuer resolution — deferred LogValuer resolution from logRecord.append to normalizeValue, 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 unrecognized slog.Value kinds (#6)

Dependencies

  • Updated Go from 1.24 to 1.25
  • Updated aws-lambda-go from v1.49.0 to v1.50.0
  • Added stretchr/testify and goleak for 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.Run conformance tests for both JSON and text formats
  • Added internal tests for level parsing, level strings, logRecord operations, text serialization, and value normalization
  • Added goroutine leak detection with goleak
  • Added tests for LogValuer resolution and complex types like http.Request

Full Changelog: maddiesch/slog-lambda@v1.2.0...v1.2.1