Skip to content

Commit 5b188e6

Browse files
prateekatknoldusanalytically
authored andcommitted
updated README.md
1 parent 45c5ce8 commit 5b188e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ val logger = Logger[MyClass]
7575
The `LazyLogging` and `StrictLogging` traits from the `com.typesafe.scalalogging` package define the `logger` member as
7676
a lazy or strict value respectively, whereas the `AnyLogging` trait defines an abstract `logger`.
7777

78+
It depends on the individual use case which trait to use. However, we have defined some scenarios where you can use these traits:
79+
7880
- Use `LazyLogging` if you are creating lots of objects with this trait repetitively.
7981
- Use `StrictLogging` pretty much by default, especially if the class is a singleton, or you know the log methods will always be invoked.
8082
- Use `AnyLogging` when writing some trait which needs access to any logger without deciding on a specific implementation.

0 commit comments

Comments
 (0)