The Blindsight is a scala logging API based on SLF4J API, Logback and logstach logback encoder. It delegates logging to the SLF4J API and doesn’t configure or manage the SFL4J implementation. It use macro to get the source code information and support cross-thread context.
1 Getting Started
First add the following repository for dependency ivy"com.tersesystems.blindsight::blindsight-logstash:1.0.1".
|
|
Then import the type import com.tersesystems.blindsight.LoggerFactory.
Finally create a logger: val logger = LoggerFactory.getLogger and use it for logging. The default logger name is the outside class/object name. You can also use LoggerFactory.getLogger(getClass). If using a string, the string must follow the valid package pattern such as app.myClass. The default LoggerResolver is class-based logging.
2 SFL4J API
The call logger.info("I am an SLF4J-like logger") is implemented as
|
|
Blindsight generalizes the concepts of Marker, Messange and Argument.