Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log4j, "Category root set to OFF" (oh my!)

 
Sean Sullivan
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application uses the NCR Teradata JDBC driver.
terajdbc4.jar - version 3.0.0.1
http://www.teradata.com/
By default, this driver will shut off Log4j's root logger.
I don't know why NCR decided to implement the driver in this manner.
I found a PDF on www.teradata.com: Teradata-JDBC-2012-033C.pdf
The PDF explains how Teradata's JDBC driver uses Log4j.
I am planning to contact Teradata tech support.
-Sean
> -----Original Message-----
> From: Sullivan, Sean C - MWT
>
> Here is my configuration:
>
> Jakarta Commons Logging 1.0.3
> Log4j 1.2.8
> IBM Websphere Application Server 4.0.5
>
> My stdout log file shows this output:
>
> log4j: Parsing for [root] with value=[OFF].
> log4j: Level token is [OFF].
> log4j: Category root set to OFF
> log4j: Finished configuring.
>
> What does "Category root set to OFF" mean?
>
>
> Here is my config file, log4j.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>
> <!-- =====================================================================
> -->
> <!--
> -->
> <!-- Log4j configuration file
> -->
> <!--
> -->
> <!-- =====================================================================
> -->
>
>
>
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> debug="true" >
>
> <appender name="STDERR" class="org.apache.log4j.ConsoleAppender">
> <param name="Target" value="System.err"/>
> <layout class="org.apache.log4j.PatternLayout">
> <param name="ConversionPattern"
> value="%-5p %c{3} - %m [%X{server.hostname}]%n"/>
> </layout>
>
> <filter class="org.apache.log4j.varia.LevelRangeFilter">
> <param name="AcceptOnMatch" value="true"/>
> <param name="LevelMin" value="WARN"/>
> <param name="LevelMax" value="FATAL"/>
> </filter>
>
> </appender>
>
> <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
> <param name="Target" value="System.out"/>
> <layout class="org.apache.log4j.PatternLayout">
> <param name="ConversionPattern"
> value="%-5p %c{3} - %m [%X{server.hostname}]%n"/>
> </layout>
> <filter class="org.apache.log4j.varia.LevelRangeFilter">
> <param name="AcceptOnMatch" value="true"/>
> <param name="LevelMin" value="INFO"/>
> <param name="LevelMax" value="INFO"/>
> </filter>
> </appender>
>
> <appender name="EMAILNOTIFICATION"
> class="org.apache.log4j.net.SMTPAppender">
> <param name="SMTPHost" value="somehost.foobar.net"/>
> <param name="To" value="you@foobar.net"/>
> <param name="From" value="websphere@foobar.net"/>
> <param name="Subject" value="Message from Websphere"/>
> <param name="BufferSize" value="1"/>
> <layout class="org.apache.log4j.PatternLayout">
> <param name="ConversionPattern"
> value="[%d{DATE}]%nServer hostname:
> %X{server.hostname}%n%-5p %c{3} - %m%nThread name: %t%n"/>
> </layout>
> </appender>
>
> <!-- ======================= -->
> <!-- Setup the Root category -->
> <!-- ======================= -->
>
> <root>
> <priority value ="all" />
> <appender-ref ref="STDOUT" />
> <appender-ref ref="STDERR" />
> <appender-ref ref="EMAILNOTIFICATION" />
> </root>
>
> </log4j:configuration>
>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic