Bug 40585

Summary: org.apache.juli.FileHandler does not allow programmatic creation using parametrized constructor
Product: Tomcat 5 Reporter: Alexandr Ufimtsev <myhlam>
Component: Catalina:ModulesAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P4    
Version: 5.5.16   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   

Description Alexandr Ufimtsev 2006-09-22 18:06:20 UTC
If org.apache.juli.FileHandler is created programmatically with parametrized
constructor 

public FileHandler(String directory, String prefix, String suffix)

, FileHandler ignores custom constructor parameters, creates log handler with 
default configuration and writes log file to 
"${catalina_home}/bin/logs" with the name "juli.YYYY-MM-DD.log"
(YYYY, MM and DD are substituted with actual year, month and date)

It looks like the problem is in the fact parametrized constructor calls 
default constructor. Default constructor in turn performs handler configuration
from LogManager properties and creates a log file based on this default 
configuration. 

This makes custom constructor parameters effectively ignored.
Comment 1 Mark Thomas 2006-11-25 10:27:49 UTC
This has been fixed in SVN and will be included in 5.5.21 onwards.