You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- SLF4J loggers and our Logger now survive serialization. By survive serialization, we mean that the
63
-
deserialized logger instances are fully functional.
61
+
Or, you pass in a class:
64
62
65
-
## Using Scala Logging ##
63
+
```scala
64
+
vallogger=Logger(classOf[MyClass])
65
+
```
66
66
67
-
The `Logger` class from the `com.typesafe.scalalogging` package wraps an underlying SLF4J logger. Hence, in order to create a `Logger`, you have to pass a SLF4J logger to the `apply` factory method defined in the `Logger` companion object:
67
+
Or, using the runtime class wrapped by the implicit class tag parameter:
68
68
69
69
```scala
70
-
vallogger=Logger(LoggerFactory.getLogger("name"))
70
+
vallogger=Logger[MyClass]
71
71
```
72
72
73
73
The `LazyLogging` and `StrictLogging` traits from the `com.typesafe.scalalogging` package define the `logger` member as
@@ -80,6 +80,21 @@ class MyClass extends LazyLogging {
80
80
}
81
81
```
82
82
83
+
### What's new?
84
+
85
+
##### 3.5.0
86
+
- More Logger factory methods, bugfixes and upgrades, published for Scala 2.12.0-M5 and 2.12.0-RC1.
87
+
88
+
##### 3.4.0
89
+
- Fixes #38 - Logger.info() cannot be used with primitive types.
0 commit comments