-
Notifications
You must be signed in to change notification settings - Fork 11
Release Notes
jokade edited this page Sep 17, 2020
·
10 revisions
Published for Scala 2.12.x/2.13.x, Scala.js 1.0, and Scala Native 0.3.9/0.4.0-M2.
Published for Scala 2.11.12/2.12.2, Scala.js 0.6.19, and Scala Native 0.3.6.
- add
GLibLoggerFactory
backend
Published for Scala 2.11.11/2.12.2, Scala.js 0.6.19, and Scala Native 0.3.2.
- #28: Add support for Scala Native
- #29: Simplify implementation of Loggers with LoggerTemplate
- #30: Improve Configuration of PrintLogger
- #31: Add TerminalLogger for Scala Native
- #32: Add Support for syslog on Scala Native
- #22: HttpLoggerFactory should use content type application/json
Published for Scala 2.11.11/2.12.2 and Scala.js 0.6.18.
- #25: Add module support for winston backend
Published for Scala 2.11.8/2.12.0 and Scala.js 0.6.13; no modifications.
- #18: Agnostic HttpLogger
- #17: Fix HttpLoggers log method overloads
Slogging now supports SLF4J-style parameterized messages:
val obj = new SomeObject
logger.debug("The new object is: {}.",obj)
-
LoggerHolder
now has the memberloggerName
which is used as the source name for all logging statements; as a result,PrintLogger
,ConsoleLogger
,HttpLogger
andWinstonLogger
no longer require the source name as an instance variable and a single instance of these loggers will be used. However, when usingSLF4JLoggerFactory
still a single instance is used for eachLoggingHolder
due to the underlying architecture. - The new
FilterLogger
allows more fine-grained control over what is actually logged viaFilterLogger.filter
. -
MultiLogger
is a simple wrapper for sending a logging message to more than one backend. - Set
PrintLogger.printTimestamp = true
to enable timestamp logging for allPrintLogger
instances.
Configuration and activation of a specific LoggerFactory has changed since version 0.2; the factory to be used now has to be assigned explicitly:
import slogging._
// set logger factory to be used
LoggerConfig.factory = PrintLoggerFactory()
// set log level
LoggerConfig.level = LogLevel.TRACE
This release comes with the following new backends:
-
SLF4JLoggerFactory
: a wrapper around the slf4j logging library -
WinstonLoggerFactory
: a wrapper around the Node.js winston logging library -
HttpLoggerFactory
: a simple backend that sends log messages to a HTTP server via Ajavax POST requests
It is now possible to disable logging altogether at compile time. To this end add
scalacOptions += "-Xmacro-settings:slogging.disable"
to your build.sbt
.