Did you try (Joel) instead of [Joel]. Does SocketAppender even use a conversion pattern? I thought it just serialized the event.
On 6/22/05, Schuweiler, Joel J. <[EMAIL PROTECTED]> wrote: > I would love to do it with package names but that would force everyone to use > packages. Unfortunately lots of folks don't. > > The [joel] doesn't come through on the server socket side. Using ethereal it > didn't appear to even be sent over the network. > > -----Original Message----- > From: Javier Gonzalez [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 22, 2005 2:18 PM > To: Log4J Users List > Subject: Re: Log4j.properties questions with ConversionPattern and Appender > > 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] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- James Stauffer Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
