Re: Do I need to clear programmatic loggers/appenders

2019-06-29 Thread Matt Sicker
If you’re making loggers per user, for example, that might make more sense as thread context data. On Sat, Jun 29, 2019 at 06:11, Dominik Psenner wrote: > Creating this many appenders is troublesome also for any operating system > because the number of open (file) handles is limited. A little bi

Re: Do I need to clear programmatic loggers/appenders

2019-06-29 Thread Dominik Psenner
Creating this many appenders is troublesome also for any operating system because the number of open (file) handles is limited. A little bit old anf thus possibly outdated but still provides insights into windows specific details and highlights some corner stones for orientation: https://blogs.tec

Re: Do I need to clear programmatic loggers/appenders

2019-06-29 Thread Jochen Wiedmann
You are creating millions of loggers? Meaning either of - I have a million different logger Id's, and create a logger for every single one, or - I have a limited number of different logger Id's, but invoke LoggerContext.getLogger(String), or LogManager.getLogger(String), or something similar, wi

Re: Do I need to clear programmatic loggers/appenders

2019-06-27 Thread Ralph Goers
Why are you dynamically creating loggers? I know of no valid reason to do that. Ralph > On Jun 27, 2019, at 11:38 AM, Gaurav wrote: > > I am creating millions of loggers. As, the logger is requested at runtime, I > cannot store the configuration in the static log4j2.xml. So, I create a > roll

Re: Do I need to clear programmatic loggers/appenders

2019-06-27 Thread Gaurav
I am creating millions of loggers. As, the logger is requested at runtime, I cannot store the configuration in the static log4j2.xml. So, I create a rolling file appender and attach it to a logger. On 2019/06/27 13:14:28, Ralph Goers wrote: > You are creating millions of Loggers or millions o

Re: Do I need to clear programmatic loggers/appenders

2019-06-27 Thread Ralph Goers
You are creating millions of Loggers or millions of LoggerConfigs? What you are doing is incomplete. But why would you be dynamically creating millions of Loggers and Appenders? Whatever you are doing I am sure there is a better way to do it. Can you please describe your use case and why you thi

Do I need to clear programmatic loggers/appenders

2019-06-27 Thread Gaurav
Hi all, My application creates millions of loggers and appenders. I'm worried about the memory usage. For that, I am doing following things. 1.Remove appender from LoggerConfig. 2.Stop the LoggerConfig. 3. Remove logger from Configuration. But when I do the performance test, it prints the error