0
votes

Text

I am little confused with the explanation on log4j site, could somebody please put some light on my ignorance.

Does the graph represents, the number of application threads currently used by application to run its business logic or it represents the number of threads that will be used by logger or disruptor in case of all Async Loggers.

In other words, does the graph represents the threads that are generating logs or does it represent the threads consuming logs on behalf of log4j2.

Please share some official references and is there any way to configure the number of threads that will be used by logger. I don't want my application to slog by loggers thread so is there any way to configure log4j to use CPU less.

1
@RemkoPopma plz AnswerSunil Garg

1 Answers

1
votes

The number of threads in the graph represents the number of application threads that do logging concurrently.

With Async Loggers there is only one background thread that writes to the log files.

What the graph shows is that the data structure used to handoff log events from the many producer (application) threads to the single consumer thread is very efficient even under high contention, resulting in much better logging throughput.