wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Log4j, Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Log4j, "Category root set to OFF" (oh my!)" Watch "Log4j, "Category root set to OFF" (oh my!)" New topic
Author

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

Sean Sullivan
Ranch Hand

Joined: Sep 09, 2001
Posts: 427
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>
>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Log4j, "Category root set to OFF" (oh my!)
 
Similar Threads
Log4j lose log information issue
How to suppress warnings thrown by log4j?
Separate log file
How to configure Log4j with two managed server?
not updating new file using DailyRollingFileAppender