Skip to content

nfrankel/slf4k

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SLF4K

This library is a thin Kotlin wrapper around the SLF4 API to lazily evaluate messages and arguments passed to the logger methods.

The following snippet will call expensiveOperation() regardless of the log priority level:

LOGGER.debug("A message with an ", expensiveOperation())

The library aims to offer the following:

LOGGER.debug("A message with an ") { expensiveOperation() }

With this, expensiveOperation() will get called only if the log priority is set to DEBUG or lower.