On 6/22/05, Schuweiler, Joel J. <[EMAIL PROTECTED]> wrote:
> Assuming I had a bunch of lines like
>
> Logger.debug("Joels project " + someOtherString);
>
> And set it up the conversion pattern to display the message first I could
> simply check
> what the first line starts with and split the log up into a bunch of smaller
> logs. What I'm
> wondering if there is an easier way to add "Joels Project" to every log
> message.
Mmmm, you could have your developers put a distinctive package name in
their hierachy, and then start the conversion pattern with the Logger
name (asuming you create your loggers using the usual
Logger.getLogger(ThisClass.class))
Then you'd start getting messages like this:
foo.bar.joelsproject.SomeClass: <message...>
foo.bar.bobsproject.SomeOtherClass: <message...>
foo.bar.janesproject.YetAnotherClass: <message...>
Looking at your properties file, doesn't putting [Joel's] in the
pattern work? Or you have multiple projects using the same log4j
configuration?
--
Javier Gonzalez Nicolini
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]