SpaceLeam opened a new pull request, #102: URL: https://github.com/apache/logging-log4j-scala/pull/102
Fixes #101 ### Description noticed that `Logger.traceEntry` was eagerly evaluating `.toString` on arguments and didn't check for nulls, which caused NPEs even when tracing was disabled. In this PR, I've updated `Logger.scala` (for both Scala 2 and 3) to: - Check `delegate.isTraceEnabled` first (lazy evaluation). - Add a null check for `params.head`. I also added unit tests in `LoggerTest.scala` to verify that passing `null` or an object with a throwing `toString` no longer crashes the application. ### Verification Ran `./mvnw clean test` on both modules and everything passed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
