Is anyone using Log4J Kotlin API? If so, I’m curious to know how you set up your loggers for use with top-level functions (i.e not part of a class.)
c
corneil
02/16/2021, 10:52 PM
declare the logger in an object in the same file and use the logger from the function. The classname reported by logger is recognisable from the package and object name. I imagine you want to know which name to use when configuring loglevel in Log4J. I usually focus on the packages or use text names that are well defined when creating the logger.