logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John B. Moore" <...@microps.com>
Subject Re: Logs, where art thou????
Date Sat, 07 Feb 2004 17:14:33 GMT
Thanks... but...

    Can one ad that switch when running as a service.. (WinXP)..?? (no 
effect when tried in the property file..

    >> property file is not found...

     Yeah, this is concerning me.. in Tomcat 3.x I never had any 
problems with Log4j..  and when I run Tomcat 4.1.27 in JBuilder there 
are no problems finding property files and logging.. It is only when I 
"deploy" the application to the Apache/Tomcat 4.1.28 combo that I'm 
getting this mysterious behavior.. In addtion the basic 
System.out.println(..) statements are not showing up and any log 
files...  (which would reveal important issues as to paths and 
contexts....etc..)

      I'm really struggling to find a foothold on this... it is so 
strange...

     John..

Paul Smith wrote:

>First thing I would say to to try is to add:
>
>log4j.debug=true
>
>to either your property file, OR as a -D switch to the vm arguments
>(later is safer as it can't be missed by Log4j if for some reason your
>property file is not being found).  
>
>That will output any configuration log4j does to the console so you can
>see anything.  Usually Tomcat will put this in the
>$TOMCAT_HOME/logs/catalina.out file if you run tomcat separately, or to
>wherever stdout is set to within an IDE.
>
>That might help you figure out a bit more.  
>
>cheers,
>
>Paul Smith
>
>On Sat, 2004-02-07 at 09:56, John B. Moore wrote:
>  
>
>>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: log4j-user-unsubscribe@logging.apache.org
>>For additional commands, e-mail: log4j-user-help@logging.apache.org
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>  
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message