Logging with specialized logger for webapplication
Hello, We use WebSphere as application server which has the standard logging files SystemOut.log and SystemErr.log. I want to create a log4j configuration with a special logger SpecialLogger which logs all debug/info/error messages to a special log file. Additionally error messages should be logged to SystemErr.log but the debug/info messages from this logger should not be logged to SystemOut.log (but other info messages not from this logger should be logged). Maybe there is a solution with additivity=false and LevelRangeFilter but I cannot get it work like described. Here is my last try: ?xml version=1.0? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=stdout class=org.apache.log4j.ConsoleAppender layout class=org.apache.log4j.PatternLayout /layout /appender appender name=SpecialLoggerAppender class=org.apache.log4j.RollingFileAppender layout class=org.apache.log4j.SimpleLayout/ filter class=org.apache.log4j.varia.LevelRangeFilter /filter /appender logger name=SpecialLogger additivity=false level value=error / appender-ref ref=SpecialLoggerAppender / /logger root level value=error/ appender-ref ref=stdout / /root /log4j:configuration Can someone help please? Thanks in advance -- View this message in context: http://old.nabble.com/Logging-with-specialized-logger-for-webapplication-tp34066057p34066057.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
FW: logfilepatternreceiver issue
Hi: I am trying to configure Chainsaw to see logs in a centOS machine. I been trying a while, but I do still receive this error. Someone can see what I am not able to? Regards, Tatiana Castano Properties {{hostname,chainsaw}{log4jid,110}{application,log}} Java.net.MalformedURLException At java.net.URL.(URL.java:617) At java.net.URL.(URL.java:480) At java.net.URL.(URL.java:429) Throwable at org.apache.log4j.varia.LogFilePatternReceiver$1.run(LogFilePatternReceveir.j ava:805) At java.lang.Thread.run(Thread.java:722) by: java.lang.NullPointerException At java.net.URL.(URL.java:522) 4 more
Re: Logging with specialized logger for webapplication
I think some of your config is missing. It must have gotten messed up by your email client or something? Maybe you can try to attach (can't remember if the list allows attachments) or post a link to the config. Jake On Mon, 25 Jun 2012 05:05:38 -0700 (PDT) garfield168 garfield...@gmx.de wrote: Hello, We use WebSphere as application server which has the standard logging files SystemOut.log and SystemErr.log. I want to create a log4j configuration with a special logger SpecialLogger which logs all debug/info/error messages to a special log file. Additionally error messages should be logged to SystemErr.log but the debug/info messages from this logger should not be logged to SystemOut.log (but other info messages not from this logger should be logged). Maybe there is a solution with additivity=false and LevelRangeFilter but I cannot get it work like described. Here is my last try: ?xml version=1.0? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=stdout class=org.apache.log4j.ConsoleAppender layout class=org.apache.log4j.PatternLayout /layout /appender appender name=SpecialLoggerAppender class=org.apache.log4j.RollingFileAppender layout class=org.apache.log4j.SimpleLayout/ filter class=org.apache.log4j.varia.LevelRangeFilter /filter /appender logger name=SpecialLogger additivity=false level value=error / appender-ref ref=SpecialLoggerAppender / /logger root level value=error/ appender-ref ref=stdout / /root /log4j:configuration Can someone help please? Thanks in advance -- View this message in context: http://old.nabble.com/Logging-with-specialized-logger-for-webapplication-tp34066057p34066057.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org