Here is an extract of our log4j.xml file. Socket appender is nice, e.g. lets you have the server send logs to a local Chainsaw running on your own computer :-)
Regarding file path, it is relative from the orion base directory. So the setup below logs to .../orion/log/content.log Happy logging! :-) - Thomas S. <?xml version="1.0" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="main" class="org.apache.log4j.DailyRollingFileAppender"> <param name="DatePattern" value="'.'yyyy-MM-dd"/> <param name="File" value="log/content.log"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} [%-5.5p] %-20c{1}: %m %x\n"/> </layout> </appender> <appender name="socket-app" class="org.apache.log4j.net.SocketAppender"> <param name="RemoteHost" value="localhost" /> <param name="Port" value="9200" /> </appender> <root> <level value="INFO"/> <appender-ref ref="main"/> <appender-ref ref="socket-app"/> </root> </log4j:configuration> > -----Original Message----- > From: Brian McSweeney [mailto:[EMAIL PROTECTED] > Sent: 25. november 2003 12:55 > To: 'Log4J Users List' > Subject: RE: Newbie setup on Orion > > > Thanks Thomas, > > This looks like a much better way to go. > Could you possibly tell me if it's possible then to log to a relative > folder from the log4j.xml file in WEB-INF/classes? > > If you wouldn't mind sharing the log4j.xml file it would be a great help > too! Thanks so much, > > Brian > > > -----Original Message----- > From: Thomas Svensen [mailto:[EMAIL PROTECTED] > Sent: 25 November 2003 11:40 > To: Log4J Users List > Subject: RE: Newbie setup on Orion > > We are using log4j successfully with Orion. What we are doing, is > putting log4j.jar in the application "lib" directory and log4j.xml in > the "WEB-INF/classes". Works fine :-) > > - Thomas S. > > > -----Original Message----- > > From: Brian McSweeney [mailto:[EMAIL PROTECTED] > > Sent: 25. november 2003 12:25 > > To: [EMAIL PROTECTED] > > Subject: Newbie setup on Orion > > > > > > > > Hi all, > > > > I've used log4j with Jboss for ages and it works really well. Now I'm > > trying to port my app to Orion and I realise that I have to initialize > > log4j and setup the log4j properties file myself. > > > > I've read the docs and I'm trying to do it using an initialization > > servlet. > > > > <-- cut, cut--> > > > > > Now, I presume I then have to put a basic log4j.properties file on the > > defined path above and away we go. However, when I put the log4j > > properties file in the /orion/lib folder along with the jar itself I > get > > a nasty startup error. If anyone is successfully using log4j with > orion > > I could really do with a hand. > > > > Thanks so much, > > Brian > > > > > > > > --------------------------------------------------------------------- > > 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] > > > --------------------------------------------------------------------- > 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]