lucky_start_izumi
lucky_start_izumi

Reputation: 2591

Log4j used in multithread project

If I use log4j in a multithread project, is it possible to have race condition? When all threads trying to access that logger?

If there's no race condition, does log4j provide some mechanism to avoid that?

Thank you very much:)

Upvotes: 3

Views: 269

Answers (1)

Jahan Zinedine
Jahan Zinedine

Reputation: 14874

I think that there is just one instance of logger object, so the race condition may be on a log target in case of target not being able to handle that e.g. A file sysytem.

Upvotes: 1

Related Questions