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.