logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Wiedmann <jochen.wiedm...@gmail.com>
Subject Dynamically creating loggers
Date Fri, 15 Apr 2016 09:02:21 GMT

I've got an application, where I would like to obtain loggers on the
fly, because the logger name isn't known in advance. (Think of it as a
logging server, which will be used by remote clients.)

Now, creating a Logger might be an expensive operation. Thus, my question:

- Would you recommend to always invoke LogManager.getLogger(String)
and use the result?
- Or would it be better to maintain a Map<String,Logger> with the
logger name as key?



The next time you hear: "Don't reinvent the wheel!"


To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message