Skip to content

Commit

Permalink
Add Kotlin-style logging API with lambda support
Browse files Browse the repository at this point in the history
Introduced new Kotlin-style logging methods using lambda expressions, which are evaluated only if the respective log level is enabled. Updated README.md and tests to demonstrate the usage of these new methods.
  • Loading branch information
smyrgeorge committed Oct 17, 2024
1 parent be38a1f commit f73b2e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ log.info("this is a test")
// Support for mute/unmute each logger programmatically.
RootLogger.loggers.mute("io.github.smyrgeorge.log4k.MainTests")
log.info("this is a test with 1 arg: {}", "hello")
RootLogger.loggers.unmute(this::class)
RootLogger.loggers.unmute(this::class) // Will set the logging level that had before was muted.
log.info("this is a test with 1 arg: {}", "hello")

try {
Expand Down

0 comments on commit f73b2e7

Please sign in to comment.