tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Running Tomcat under jsvc - logging problems
Date Tue, 04 Dec 2012 18:50:58 GMT
2012/12/4 Lyallex <lyallex@gmail.com>:
> Hi
>
> apache-tomcat-6.0.36
> CentOS
> uname -m = i686
> uname -r = 2.6.18-028stab070.14-ent
> uname -s = Linux :-)
> jdk1.6.0_07
>
> I have recently upgraded my production server from apache-tomcat-6.0.18 to
> 6.0.36 so that my live and dev
> env's are as similar as possible
>
> 6.0.18 runs fine and logs as expected, this version was already installed
> when I
> started renting the server from the hosting company, it runs as user tomcat
> under jsvc.
>
> I compiled jsvc from the source included in the 6.0.36 distro
> following the instructions in the tomcat docs and copied
> /etc/init.d/tomcat6 (the old start/stop script) to
> /etc/init.d/tomcat. I modified the file to point to the new version and
> started the server
> /etc/init.d/tomcat has been pasted at http://pastebin.com/ihGDJb1C for your
> perusal should you wish.
>
> Actually Tomcat runs fine, it serves my site and carries a good load (200+
> sessions concurrently with no apparent degradation)
> there is no Apache front end, Tomcat runs standalone. The problem is with
> the logging
>
> /etc/init.d/tomcat has the following two lines
>
> -outfile $CATALINA_HOME/logs/catalina.out \
> -errfile $CATALINA_HOME/logs/catalina.err \
>
> And here's the problem. Most of the logging output ends up in catalina.err
> even though there are no errors in the logs
> occasionally a few lines from my application loggers end up in
> catalina.out. I also have logging.properties
> in WEB-INF/classes. This has been around ever since I deployed the first
> version of my app a couple of years ago
> and has always produced the expected output. Now I get nothing.
>
> The hosting companies preferred solution is to recompile tomcat 'for a one
> off fee' (I kid you not). I'm pretty sure that Tomcat doesn't need
> rebuilding to run under jsvc
> and if it does I'm quite capable of building it myself, so no help there
> then ...
>
> logging.properties reproduced below just FYI if you want it.
>
> Any advice on how I can get the logging working will be much appreciated
>
>
> Lyallex
>
>
>
> handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
>
> ############################################################
> # Handler specific properties.
> # Describes specific configuration info for Handlers.
> ############################################################
>
> org.apache.juli.FileHandler.level = ALL
> org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> org.apache.juli.FileHandler.prefix = MyApp.
>
> java.util.logging.ConsoleHandler.level = ALL
> java.util.logging.ConsoleHandler.formatter =
> java.util.logging.SimpleFormatter


1. "java.util.logging.ConsoleHandler" prints to System.err.

Some other "console logging" implementations log to System.out.

Do you need a ConsoleHandler at all? (You are effectively printing the
same log messages into two places a) ConsoleHandler, b) FileHandler ).

2. To initialize logging properly you need to configure system
properties "java.util.logging.config.file" and
"java.util.logging.manager"
the same way as they are set by catalina.sh file.

Have you specified the "java.util.logging.manager" property in your
arguments to jsvc?

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message