shibboleth-dev - Re: log4j...
Subject: Shibboleth Developers
List archive
- From: Chad La Joie <>
- To:
- Subject: Re: log4j...
- Date: Thu, 12 May 2005 09:50:48 -0400
- Organization: UIS - Project Sentinel
Normally such messages appear because log4j can't find a configuration file anywhere and so it tries to do the "right" thing, which normally means trying to log just about everything at some default logging level (info maybe?). If you specify a log4j config file that specifies a category of something like edu.internet2.middleware.shibboleth and then specify the appenders you want to use and the logging level those messages go away. At least they do for me.
Attached is the config file I use. Note that I use JBoss so I use there extended appenders, but if you changed the class names to the standard Log4J ones it would work out just fine. The one error messages I get with this is when code tries to change the Log4J config programatically, such as in the LoggingContextListener class. I haven't quite figured out why yet, but it doesn't seem to hurt anything.
Howard Gilbert wrote:
Log4J missing appender messages are innocuous. They appear sometimes and--
disappear sometimes. Note they are generated by some other code, typically
an Apache dependency. I will check in a log4j.properties where needed to
make sure they don't appear.
Chad La Joie 315Q St. Mary's Hall
Project Sentinel 202.687.0124
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> <!-- ================================= --> <!-- Preserve messages in a local file --> <!-- ================================= --> <!-- A time/date based rolling appender --> <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="File" value="${jboss.server.home.dir}/log/server.log"/> <param name="Append" value="false"/> <!-- Rollover at midnight each day --> <param name="DatePattern" value="'.'yyyy-MM-dd"/> <!-- Rollover at the top of each hour <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/> --> <layout class="org.apache.log4j.PatternLayout"> <!-- The default pattern: Date Priority [Category] Message\n --> <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/> <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/> --> </layout> </appender> <!-- A size based file rolling appender <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="File" value="${jboss.server.home.dir}/log/server.log"/> <param name="Append" value="false"/> <param name="MaxFileSize" value="500KB"/> <param name="MaxBackupIndex" value="1"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/> </layout> </appender> --> <!-- ============================== --> <!-- Append messages to the console --> <!-- ============================== --> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="Target" value="System.out"/> <param name="Threshold" value="INFO"/> <layout class="org.apache.log4j.PatternLayout"> <!-- The default pattern: Date Priority [Category] Message\n --> <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/> </layout> </appender> <!-- ================ --> <!-- Limit categories --> <!-- ================ --> <!-- Limit the org.apache category to INFO as its DEBUG is verbose --> <category name="edu.internet2.middleware"> <priority value="DEBUG"/> </category> <!-- ======================= --> <!-- Setup the Root category --> <!-- ======================= --> <root> <appender-ref ref="CONSOLE"/> <appender-ref ref="FILE"/> </root> </log4j:configuration>
- log4j..., Atif Suleman, 05/12/2005
- Re: log4j..., Tom Scavo, 05/12/2005
- Re: log4j..., Atif Suleman, 05/12/2005
- Re: log4j..., Tom Scavo, 05/12/2005
- Re: log4j..., Steven_Carmody, 05/12/2005
- Re: log4j..., Walter Hoehn, 05/16/2005
- Re: log4j..., Atif Suleman, 05/12/2005
- RE: log4j..., Howard Gilbert, 05/12/2005
- Re: log4j..., Atif Suleman, 05/12/2005
- Re: log4j..., Chad La Joie, 05/12/2005
- Re: log4j..., Walter Hoehn, 05/12/2005
- <Possible follow-up(s)>
- Re: log4j..., gxdev Developer, 05/17/2005
- Re: log4j..., Tom Scavo, 05/12/2005
Archive powered by MHonArc 2.6.16.