getLogger

open fun getLogger(loggerName: String): NoCoLogger

Returns an instance of NoCoLogger with the specified name.

Example usage: public class ThingDoer { private static final NoCoLogger auditLogger = LoggerFactory.getLogger("auditing"); public void doThing() { auditLogger.info("Doing thing"); } }

Return

a new or existing instance with that name

Parameters

loggerName

name of the logger


open fun getLogger(loggerClass: Class<out Any>): NoCoLogger

Returns an instance of NoCoLogger with the name of the specified class.

Example usage: public class ImportantService { private static final NoCoLogger logger = LoggerFactory.getLogger(ImportantService.class); public ReturnType doStuff(ArgType arg) { logger.debug("Called doStuff with {arg}", arg); // do stuff } }

Return

a new or existing instance with that class name

Parameters

loggerClass

class whose name if for the logger