Skip to content

v0.4.0

Compare
Choose a tag to compare
@hermannm hermannm released this 31 Mar 21:31
· 173 commits to main since this release
v0.4.0
d8520e9
  • Take cause exception as a normal argument on Logger methods, instead of as a property on LogBuilder
    • This makes the normal case of logging a message along with an exception more concise
  • Use SLF4J's MDC for logging context instead of a custom thread-local
    • This allows our logging context to also apply to logs by libraries that use SLF4J
    • A new LoggingContextJsonFieldWriter is provided for Logback to enable JSON fields in MDC
  • Rename LogBuilder methods to be more concise and intuitive
    • addField and addRawJsonField are now just field and rawJsonField, like their top-level counterparts
    • addPreconstructedField is now addField
  • Add LogBuilder.addFields method to make it easier to pass a list of pre-constructed fields
  • Add ExecutorService.inheritLoggingContext extension function to make it easier to inherit logging context in tasks submitted to an ExecutorService
  • Add more constructor overloads to ExceptionWithLogFields, to allow passing log fields with less boilerplate
  • Fix edge case of unquoted strings being allowed by rawJsonField
  • Improve documentation