You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Laurent Vaills <la...@gmail.com> on 2010/03/17 09:16:34 UTC

Removing the date from the name of the file catalina.{date}.log

Hi all,

I'd like to have a catalina.log instead of catalina.{date}.log .

I took a look as saw the the implementation of the class
org.apache.juli.FileHandler forces to have a date in the filename. (I would
then suggest to rename it DateFileHandler or DailyFileHandler).
I tried to modify the file $CATALINA_BASE/conf/logging.properties to use the
standard java.util.logging.FileHandler but did not succeed : I get a file
$HOME/java0.log instead of /tmp/catalina.log .

Here is my logging.properties file :
handlers = 1catalina.java.util.logging.FileHandler,
2localhost.org.apache.juli.FileHandler,
3manager.org.apache.juli.FileHandler,
4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
#handlers = 1catalina.org.apache.juli.FileHandler,
2localhost.org.apache.juli.FileHandler,
3manager.org.apache.juli.FileHandler,
4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

.handlers = 1catalina.java.util.logging.FileHandler,
java.util.logging.ConsoleHandler
#.handlers = 1catalina.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler

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

1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.pattern = /tmp/catalina.log
1catalina.org.apache.juli.FileHandler.append = true

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


Does anyone has an idea of what's wrong ?
I read the page http://tomcat.apache.org/tomcat-6.0-doc/logging.html but
maybe I missed something.

Laurent

Re: Removing the date from the name of the file catalina.{date}.log

Posted by Laurent Vaills <la...@gmail.com>.
I am so stupid  !

Thanks for pointing me this error, it works as expected now.

Laurent

2010/3/17 Konstantin Kolinko <kn...@gmail.com>

> 2010/3/17 Laurent Vaills <la...@gmail.com>:
> >(...)
> > 1catalina.org.apache.juli.FileHandler.level = FINE
> > 1catalina.org.apache.juli.FileHandler.pattern = /tmp/catalina.log
> > 1catalina.org.apache.juli.FileHandler.append = true
> >
> The above three lines have to start with
> 1catalina.java.util.logging.FileHandler.
>
> > #1catalina.org.apache.juli.FileHandler.level = FINE
> > #1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> > #1catalina.org.apache.juli.FileHandler.prefix = catalina.
> >
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Removing the date from the name of the file catalina.{date}.log

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/3/17 Laurent Vaills <la...@gmail.com>:
>(...)
> 1catalina.org.apache.juli.FileHandler.level = FINE
> 1catalina.org.apache.juli.FileHandler.pattern = /tmp/catalina.log
> 1catalina.org.apache.juli.FileHandler.append = true
>
The above three lines have to start with
1catalina.java.util.logging.FileHandler.

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

Best regards,
Konstantin Kolinko

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