Scheduled Maintenance: over the next few days, we will update Jira to a newer version.

If you don't know Jira 4.x yet, you might be a little surprised by the UI changes ... :)

Issue Details (XML | Word | Printable)

Key: MAGNOLIA-1597
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Grégory Joseph
Reporter: Konstantin Zadorozhny
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Magnolia

Log4jConfigurer fails to locate log4j configuration file if property file format used

Created: 15/Jun/07 09:32 PM   Updated: 30/Jul/08 02:15 AM
Component/s: core
Affects Version/s: 3.0.1
Fix Version/s: 3.6.1

Time Tracking:
Not Specified

File Attachments: 1. Text File Log4jConfigurer.java.patch (0.5 kB)


Labels:
Resolution Date: 29/Jul/08 10:37 AM
Date of First Response: 15/Jun/07 09:35 PM


 Description  « Hide
There is a bug in Log4jConfigurer initLogging method. The PropertyConfigurator.configure(log4jFileName) call should use properties as a parameter.

else {
Properties properties = new Properties();
try { properties.load(IOUtils.toInputStream(config)); }
catch (IOException e) { log("Unable to initialize Log4J from [" //$NON-NLS-1$ + log4jFileName + "], got an Exception during reading the properties file " //$NON-NLS-1$ + e.getMessage()); return; }
PropertyConfigurator.configure(log4jFileName); // FIXME
}



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Grégory Joseph added a comment - 15/Jun/07 09:35 PM
Can you please provide a patch for faster inclusion / better view of the actual change? thanks.

Philippe Marschall added a comment - 29/Jul/08 07:38 AM
Fix attached.

The problem is that you use the original, relative file name to configure log4j which can't find it. What should be used instead is the in memory stream for which variables have been replaced.


Grégory Joseph added a comment - 29/Jul/08 10:37 AM
patch applied, thanks !