Sussed it, I didn't understand the functionality of isDebugEnabled() Doh!
(I used to like problems like this when I was doing support, you looked at the person asking and then they answered it themsevles...lol...) Tim. On Mon, 2002-05-13 at 12:25, Tim Sawyer wrote: > I have the following simple configuration: > > <category > name="com.pancredit.eaitoolkit.framework.accessor.ConfigFileTCPAccessor"> > <priority value="info"/> > <appender-ref ref="A1"/> > </category> > > <root> > <priority value="fatal"/> > <appender-ref ref="A1"/> > </root> > > In my code I have the following logging statements: > > > Category lLogger = > >Category.getInstance("com.pancredit.eaitoolkit.framework.accessor.ConfigFileTCPAccessor"); > > if (lLogger.isDebugEnabled()) > { > lLogger.info("Connecting to " + this.forteServerIP + " on port " > + this.forteServerPort); > } > > > When I run my code, I have an empty log file. How come? I presume I'm > missing something obvious...this is the same with 1.1.3 and 1.2. > > Help! > > Tim. > > Debug output > ------------------------- > log4j: Threshold ="null". > log4j: Retreiving an instance of org.apache.log4j.Logger. > log4j: Setting > [com.pancredit.eaitoolkit.framework.accessor.ConfigFileTCPAccessor] > additivity to [true]. > log4j: Level value for > com.pancredit.eaitoolkit.framework.accessor.ConfigFileTCPAccessor is > [info]. > log4j: com.pancredit.eaitoolkit.framework.accessor.ConfigFileTCPAccessor > level set to INFO > log4j: Class name: [org.apache.log4j.RollingFileAppender] > log4j: Setting property [file] to [log/tfcPersonalLoan.log]. > log4j: Setting property [append] to [true]. > log4j: Setting property [maxFileSize] to [5MB]. > log4j: Setting property [maxBackupIndex] to [10]. > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout" > log4j: Setting property [conversionPattern] to [%d{HH:mm:ss} [%t] %-5p > %C{2} - %m%n]. > log4j: setFile called: log/tfcPersonalLoan.log, true > log4j: setFile ended > log4j: Adding appender named [A1] to category > [com.pancredit.eaitoolkit.framework.accessor.ConfigFileTCPAccessor]. > log4j: Level value for root is [fatal]. > log4j: root level set to FATAL > log4j: Adding appender named [A1] to category [root]. > > > > Full config file > ------------------------- > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> > <log4j:configuration debug="true" > xmlns:log4j="http://jakarta.apache.org/log4j/"> > > <!-- This file is used to configure the logging code that is present > in the toolkit. See http://jakarta.apache.org/log4j/ for more > details --> > > <appender name="A1" > class="org.apache.log4j.RollingFileAppender"> > <param name="File" value="log/tfcPersonalLoan.log"/> > <param name="Append" value="true"/> > <param name="MaxFileSize" value="5MB"/> > <param name="MaxBackupIndex" value="10"/> > <layout class="org.apache.log4j.PatternLayout"> > <param name="ConversionPattern" value="%d{HH:mm:ss} [%t] > %-5p %C{2} - %m%n"/> > </layout> > </appender> > > <category > name="com.pancredit.eaitoolkit.framework.accessor.ConfigFileTCPAccessor"> > <priority value="info"/> > <appender-ref ref="A1"/> > </category> > > <root> > <priority value="fatal"/> > <appender-ref ref="A1"/> > </root> > </log4j:configuration> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>