You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tomcat Random <to...@gmail.com> on 2013/08/22 17:44:23 UTC

Tomcat 7.0 logging on different platforms

My development setup is Win7 while my production is RHEL6. Both of the
environments have the same settings in conf/logging.properties but the
files in logs/ are slightly different.

The access logs are named the same way. but on RHEL there's no
tomcat7-stdout or tomcat7-stderr log files. Just 'catalina.out.YEAR.MO.DY'
and the cumulative "catalina.out" with no date.

What accounts for the differences?

Also, how would you stop logging to the 'catalina.out' file. It gets
unusably gigantic within a few days.

Thanks,
Alec

Re: Tomcat 7.0 logging on different platforms

Posted by Tomcat Random <to...@gmail.com>.
It's a service on RHEL: eg "service tomcat start" - that does call
catalina.sh so I can see where the catalina.out file is being generated.
I'll probably just comment that out, although without any console logging
in logging.properties it becomes quite light and captures System.err.print
messages without any specified logging level. Possibly useful.

The "Unable to create [logs]" problem was the
"4host-manager.org.apache.juli.FileHandler"
without any handler specific properties.

-Alec






On Wed, Aug 28, 2013 at 10:38 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> To whom it may concern,
>
> On 8/23/13 4:08 PM, Tomcat Random wrote:
> > I've deleted any reference in logging.properties to the console.
> > However the file rm'd catalina.out file still coming back on
> > restarts. Any ideas? catalina,out is now also reporting
> > "java.util.logging.ErrorManager: 4: Unable to create [logs]"
>
> How are you launching Tomcat?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.14 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJSHgthAAoJEBzwKT+lPKRYjVYQAJE4tDjLN/wnJ3CgRHyV0h/s
> 74ngb9um1zsE98vdZupnoLN2uxtEtLvilXOkAmYV0ECAW3/jrkAkhPdcDzp+uoPy
> IWsuPnQp6ADBgY1Sn/JUzOiuWxua+4kuZru9Lk6NikIPEf1lxQwEAehrRbcyW81K
> 4/b9ldP4W80hHQuxgHHSVL8WWJpKDAioIT9jSWOZ6S8/MQYW2Gs/AFtmNMooPHmr
> zNEmm0gE3Y/5lZUmsUjYv//xCdfksmdYmEgo1iH48vNSyJDwxn/S+pxCmbf2gROp
> 4Lpab3nM4zLn+8FkYqukve22sOKwmOeWJ/28u0zo1DB0eEsnAjr+iUGa1Ff9X9pk
> Uebc6qQz6QC2MuLf9UsFelj6oCnRAgW/EXKtqE+g1AogplCv7tPnDFQjTo+UMKsh
> +UuGUJfIMlD04o7ZV+wFzVgeJdQ1FNPxniWoXnFolafUalSXKD9nSfKMwL1FCdtI
> 9S/DmmpHIzIm3fT8C8GZu7xGypqGfr5siIFFQeUWJR/RdZojAcEjGEzbmBT1nGwv
> OcaHq8DIcR62t0dMgdceE1ZOmxYBKwWtZYeMyV6oRkCZWzxiYdk45lOE4MalBi3F
> odsTFvhvEmdnCgEkw7Gu6fjYOPvm4RTLb2nvUg5uYB5Rgu2pMAB+7RxfLcg3PlUY
> BoUCswXVBKfaBpDqd5KE
> =d6es
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 7.0 logging on different platforms

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

To whom it may concern,

On 8/23/13 4:08 PM, Tomcat Random wrote:
> I've deleted any reference in logging.properties to the console.
> However the file rm'd catalina.out file still coming back on
> restarts. Any ideas? catalina,out is now also reporting
> "java.util.logging.ErrorManager: 4: Unable to create [logs]"

How are you launching Tomcat?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSHgthAAoJEBzwKT+lPKRYjVYQAJE4tDjLN/wnJ3CgRHyV0h/s
74ngb9um1zsE98vdZupnoLN2uxtEtLvilXOkAmYV0ECAW3/jrkAkhPdcDzp+uoPy
IWsuPnQp6ADBgY1Sn/JUzOiuWxua+4kuZru9Lk6NikIPEf1lxQwEAehrRbcyW81K
4/b9ldP4W80hHQuxgHHSVL8WWJpKDAioIT9jSWOZ6S8/MQYW2Gs/AFtmNMooPHmr
zNEmm0gE3Y/5lZUmsUjYv//xCdfksmdYmEgo1iH48vNSyJDwxn/S+pxCmbf2gROp
4Lpab3nM4zLn+8FkYqukve22sOKwmOeWJ/28u0zo1DB0eEsnAjr+iUGa1Ff9X9pk
Uebc6qQz6QC2MuLf9UsFelj6oCnRAgW/EXKtqE+g1AogplCv7tPnDFQjTo+UMKsh
+UuGUJfIMlD04o7ZV+wFzVgeJdQ1FNPxniWoXnFolafUalSXKD9nSfKMwL1FCdtI
9S/DmmpHIzIm3fT8C8GZu7xGypqGfr5siIFFQeUWJR/RdZojAcEjGEzbmBT1nGwv
OcaHq8DIcR62t0dMgdceE1ZOmxYBKwWtZYeMyV6oRkCZWzxiYdk45lOE4MalBi3F
odsTFvhvEmdnCgEkw7Gu6fjYOPvm4RTLb2nvUg5uYB5Rgu2pMAB+7RxfLcg3PlUY
BoUCswXVBKfaBpDqd5KE
=d6es
-----END PGP SIGNATURE-----

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


Re: Tomcat 7.0 logging on different platforms

Posted by Tomcat Random <to...@gmail.com>.
I've deleted any reference in logging.properties to the console. However
the file rm'd catalina.out file still coming back on restarts. Any ideas?
catalina,out is now also reporting "java.util.logging.ErrorManager: 4:
Unable to create [logs]"

Below is my altered logging.properties file:
__________________________________________


handlers = 1catalina.org.apache.juli.FileHandler,
2localhost.org.apache.juli.FileHandler,
3manager.org.apache.juli.FileHandler,
4host-manager.org.apache.juli.FileHandler

.handlers = 1catalina.org.apache.juli.FileHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.

2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.

3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers =
2localhost.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers
= 3manager.org.apache.juli.FileHandler

# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
#org.apache.catalina.util.LifecycleBase.level = FINE

# To see debug messages in TldLocationsCache, uncomment the following line:
#org.apache.jasper.compiler.TldLocationsCache.level = FINE

# For memcached session manager
de.javakaffee.web.msm.level = WARNING



On Thu, Aug 22, 2013 at 11:52 AM, Konstantin Kolinko <knst.kolinko@gmail.com
> wrote:

> 2013/8/22 Tomcat Random <to...@gmail.com>:
> > My development setup is Win7 while my production is RHEL6. Both of the
> > environments have the same settings in conf/logging.properties but the
> > files in logs/ are slightly different.
> >
> > The access logs are named the same way. but on RHEL there's no
> > tomcat7-stdout or tomcat7-stderr log files. Just
> 'catalina.out.YEAR.MO.DY'
> > and the cumulative "catalina.out" with no date.
> >
> > What accounts for the differences?
> >
>
> catalina.sh redirects stderr to stdout with 2>&1 and logs them to the same
> file
>
> Windows service wrapper (Apache Commons Daemon procrun) logs them to
> separate files.
>
> > Also, how would you stop logging to the 'catalina.out' file. It gets
> > unusably gigantic within a few days.
> >
>
> Just do not write to the console.
>
>
> http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Considerations_for_productive_usage
>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 7.0 logging on different platforms

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/8/22 Tomcat Random <to...@gmail.com>:
> My development setup is Win7 while my production is RHEL6. Both of the
> environments have the same settings in conf/logging.properties but the
> files in logs/ are slightly different.
>
> The access logs are named the same way. but on RHEL there's no
> tomcat7-stdout or tomcat7-stderr log files. Just 'catalina.out.YEAR.MO.DY'
> and the cumulative "catalina.out" with no date.
>
> What accounts for the differences?
>

catalina.sh redirects stderr to stdout with 2>&1 and logs them to the same file

Windows service wrapper (Apache Commons Daemon procrun) logs them to
separate files.

> Also, how would you stop logging to the 'catalina.out' file. It gets
> unusably gigantic within a few days.
>

Just do not write to the console.

http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Considerations_for_productive_usage


Best regards,
Konstantin Kolinko

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


Re: Tomcat 7.0 logging on different platforms

Posted by Mark Thomas <ma...@apache.org>.
On 22/08/2013 16:44, Tomcat Random wrote:
> My development setup is Win7 while my production is RHEL6. Both of the
> environments have the same settings in conf/logging.properties but the
> files in logs/ are slightly different.
> 
> The access logs are named the same way. but on RHEL there's no
> tomcat7-stdout or tomcat7-stderr log files. Just 'catalina.out.YEAR.MO.DY'
> and the cumulative "catalina.out" with no date.
> 
> What accounts for the differences?

The Windows service wrapper vs. catalina.sh

> Also, how would you stop logging to the 'catalina.out' file. It gets
> unusably gigantic within a few days.

Remove the console logger from logging.properties

Mark


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