From 5d4f36003671366e4708daec4e167a522bfa93f1 Mon Sep 17 00:00:00 2001 From: prateekatknoldus Date: Sat, 22 Jan 2022 21:47:10 +0530 Subject: [PATCH] Included a way to create Logger with class name in which it is defined --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 84bfbd6..006cfaf 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,12 @@ Or, you pass in a SLF4J logger instance: val logger = Logger(LoggerFactory.getLogger("name")) ``` +Or, you pass in the name of the class into which it is defined: + +```scala +val logger = Logger(getClass.getName) +``` + Or, you pass in a class: ```scala