grassbl8d
grassbl8d

Reputation: 2139

LOG4J Deadlock On ConsoleAppender

LOG4J seems to lock my consoleappender. If my consoleappender is locked by LOG4J, would also succeeding threads have a hard time writing to my stout and stderr?

How many threads at a time can write to the stdout?

Thanks

Upvotes: 0

Views: 1226

Answers (1)

Tomasz Nurkiewicz
Tomasz Nurkiewicz

Reputation: 340693

Only one thread can write to sysout/syserr. This is actually good, otherwise your logging statements would get mixed terribly.

I don't think Log4J deadlocks on ConsoleAppender (stack dump would be very useful). Maybe you are logging too much and other threads are waiting, but eventually reach the console?

Upvotes: 0

Related Questions