File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ val logger = Logger[MyClass]
7575The ` LazyLogging ` and ` StrictLogging ` traits from the ` com.typesafe.scalalogging ` package define the ` logger ` member as
7676a 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.
You can’t perform that action at this time.
0 commit comments