Skip to content

Commit 1ea782c

Browse files
prateekatknoldusanalytically
authored andcommitted
example for strict logging
1 parent 7442b15 commit 1ea782c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@ class LazyLoggingExample extends LazyLogging {
8787
}
8888
```
8989

90+
```scala
91+
class StrictLoggingExample extends StrictLogging {
92+
logger.debug("This is Strict Logging ;-)")
93+
94+
logger.whenDebugEnabled {
95+
println("This would only execute when the debug level is enabled.")
96+
(1 to 10).foreach(x => println("Scala logging is great!"))
97+
}
98+
}
99+
```
100+
90101
```scala
91102
class AnyLoggingExample extends AnyLogging {
92103
override protected val logger: Logger = Logger("name")

0 commit comments

Comments
 (0)