Do you have stdout specified for the service? Here is how I would install the 4.1.xx service...
%CATALINA4_HOME%\bin\tomcat.exe -install Apache-Catalina4 %JAVA_HOME%\jre\bin\server\jvm.dll -Djava.class.path=%CATALINA4_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar -Dcatalina.home=%CATALINA4_HOME% %CATALINA_OPTS% -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out %CATALINA4_HOME%\logs\stdout.log -err %CATALINA4_HOME%\logs\stderr.log
For Tomcat5, just use "%CATALINA_HOME%\bin.\service.bat install"
After you can start seeing System.out.println() statements, then you can use log4j.debug=true to see what is actually going on.
Jake
At 09:14 AM 2/7/2004 -0800, you wrote:
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
