2

I have two tomcat 6 installations running on the same Redhat 5 machine - one is "mine" and one belongs to another group at my organisation. Mine is currently 6.0.35, the other is 6.0.32. I had a problem with the filenames being generated for the tomcat logs ending up with dates in them, which broke our log rotation, so I searched around on here and found that setting the

1catalina.org.apache.juli.FileHandler.rotatable

property to false removed the date, as per the documentation here:

https://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/juli/FileHandler.html

Hurrah; problem solved. So I checked to see if the other installation was having the same problem; it was, and they asked me to help them fix it. Since their logging.properties setup was exactly the same as ours (its all based on ${catalina.base}) I just copied over the new, fixed logging.properties file that works in our installation, and fixed the permissions. But for some reason, here it doesn't work.

I can confirm from the command-line arguments of the running process that both are using the same logging.manager (org.apache.juli.ClassLoaderLogManager) and that the second installation is using the correct logging.properties config file. I can even change other properties in that file (e.g. prefix, suffix) and restart the server to see them take effect in the filenames used. But for whatever reason, the second installation seems to ignore the rotatable=false property, and refuses to generate logfiles without dates in the name. Here is the logging.properties file I'm using:

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.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.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina
1catalina.org.apache.juli.FileHandler.suffix = .log
1catalina.org.apache.juli.FileHandler.rotatable = false

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

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

4host-manager.org.apache.juli.FileHandler.level = FINE
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.FileHandler.prefix = host-manager
4host-manager.org.apache.juli.FileHandler.suffix = .log
4host-manager.org.apache.juli.FileHandler.rotatable = false

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter


############################################################
# 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

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

If anyone has any suggestions - perhaps other locations that can override the logging.properties file? - I'd sure appreciate it.

Thanks,

 - rob.
Dev Null
  • 75
  • 7

1 Answers1

2

check the tomcat-juli.jar version.

step
  • 36
  • 2