Just tried this and get the same result as you, I'd be lieing if I said I knew why, but have experimented and think its something to do with using the same stream in each logger, possibly different threads accessing the same stream ?.
If the method to create the handler creates a handle using a different FileOutputStream (outputting to different files) for each logger then it works as expected, and if it uses the same file then only the 1st logger outputs. I tried creating a handler that flushes the stream after each "publish" but that didn't have any effect.
I'd also be interested if anyone can shed any light on this.
posted 12 years ago
Interestingly the following handler works as expected
The documentation for StreamHandler says "This is primarily intended as a base class or support class to be used in implementing other logging Handlers" implying that you're not expected to use it directly, think I need to read more on the Logging package in general to understand why it doesn't work as expected.
He does not suffer fools gladly. But this tiny ad does: