I'm stumped.. I can't get the log files to appear ANYWHERE on a
windows install..

System
  WinXP
  Apache 2.0.43
  Tomcat 4.1.18
 
Upgraded to Log4j 1.2.8

Log4j.properties

===========
# root category priority
log4j.rootCategory=DEBUG, A1, R1

# A1 is a Console Appender
log4j.appender.A1=org.apache.log4j.ConsoleAppender


# R1 is a Rolling file appender
log4j.appender.R1=org.apache.log4j.RollingFileAppender
log4j.appender.R1.File=D:/Apache_Group/Tomcat41/logs/schedulerweb.log
# File Size
log4j.appender.R1.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R1.MaxBackupIndex=2


# Output Patterns
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t](%F:%L) %-5p - %m%n

log4j.appender.R1.layout=org.apache.log4j.PatternLayout
log4j.appender.R1.layout.ConversionPattern=%-4r [%t](%F:%L) %-5p - %m%n
=========================

I have tried 

log4j.appender.R1.File=D:\\Apache_Group\\Tomcat41\\logs\\schedulerweb.log

..and searched this list for any other suggestions.  I have checked
the suggestions that the log file would be in other locations.. infact
have searched both HD of this machine extensively.  no joy..

I remember having this problem before with Log4j on a windows machine
(NT4) and the newer Tomcat, and as I remember it never got a solution,
never had this problem older versions of Tomcat.

When I run Tomcat "IN" JBuilder (which is 4.1.27) the log files show
up in the main Tomcat directory which is fine.. for development I used

log4j.appender.R1.File=schedulerweb.log

..that does not work either...

I'm now beginning to think that it is something deeper going on with
tomcat.. Reason is I can not find any output for "System.out.println"
statments in the Controller servlet with the exception of "one lonely
output" in the stdout.log.  Real strange is that one output is in the
middle of a number of various configuations "System.out.println"
statments before the logger is instantiated.. ???

Anyway for the curious, the following is the base instantiation for my
logger.. (which has worked fine for years...)

g_logLogger = Logger.getLogger( this.getClass().getName() );
this.g_urlLog4j = (java.net.URL)this.g_appcontext.getAttribute("LogUrl");
if (this.g_urlLog4j == null) {
   try {
      this.g_urlLog4j =
g_appcontext.getResource("/conf/Log4j.properties");
      System.out.println(">>Log4j Prop URL: "+this.g_urlLog4j.toString());
      PropertyConfigurator.configure(this.g_urlLog4j);
      g_appcontext.setAttribute("LogUrl",this.g_urlLog4j);
   }
   catch (java.net.MalformedURLException mex) {
      mex.printStackTrace();
   } catch (Exception ex) {
      ex.printStackTrace();
   }
} else {
   PropertyConfigurator.configure(this.g_urlLog4j);
}



John..





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to