# v1.2.0 ## Highlights - Added message replacement with `Logger.AddReplacer(old, new)` for masking secrets or normalizing log output. - Preserved the existing `LoggerWriter.Print(...any)` contract, so custom writers do not need a signature update. - Improved JSON writer newline handling for messages that already end with `\n`. ## Added - `Logger.AddReplacer(old, new)` appends a replacement rule that is applied before records are sent to writers. - README and package GoDoc now document message replacement and include usage examples. - Tests covering message type preservation for custom writers, JSON empty messages, and JSON trailing newline behavior. ## Fixed - `LoggerJsonWriter.Print` no longer panics when called with no message arguments. - `LoggerJsonWriter.Print` now treats a trailing newline at the end of the last message as newline semantics and does not include that newline in the JSON `message` field. - Log messages keep their original argument types for custom writers when no replacement rules are configured. ## Changed - Updated the example program to demonstrate `AddReplacer`. - Updated dependencies: - `github.com/fatih/color` from `v1.18.0` to `v1.19.0` - `github.com/mattn/go-isatty` from `v0.0.20` to `v0.0.21` - `golang.org/x/sys` from `v0.42.0` to `v0.43.0` ## Compatibility No breaking API changes are intended in this release. The public `LoggerWriter` interface continues to accept `messages ...any`.