Lew<noone@lewscanon.com> wrote in news:jif5gv$ih$1@news.albasani.net:
Novice wrote:
Hmm. Yes, I suppose that makes sense. I need to review the whole
"inherit" aspect of logging but I've been thinking of one logger
equating to one log and that's not right, is it? See, the penny is
dropping....
A logger is an object that writes to a log. There's no essential
reason the ratio should be one to one. Au contraire, just like
everything else in Java it's reasonable to expect multiple pointers to
point to one thing and multiple writers to write to one output.
Let me ask you this. In your favorite windowing OS, don't you have
many programs each of them writing to a screen? Don't they all write
to the same screen? You don't have a separate monitor for each
program, do you?
Of course not; all programs share the same monitor. (Or would share two
if I had a double-headed setup.)
Which is why I'm surprised to see you say "no" when I asked if all of my
classes in all of my projects should write to the same log. Your analogy
suggests that the loggers should all write to the same log. But I know
you wouldn't deliberately be that self-contradictory. So there's a subtle
distinction you're making that I'm not quite seeing....