[Bug 280] New: missing constructor in org.apache.log4j.PatternLayout

http://bugzilla.slf4j.org/show_bug.cgi?id=280 Summary: missing constructor in org.apache.log4j.PatternLayout Product: SLF4J Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: blocker Priority: P1 Component: log4j-over-slf4j AssignedTo: slf4j-dev@qos.ch ReportedBy: thomas.mortagne@gmail.com It's in version 1.7.2 (can't find it in the list). When using default org.apache.velocity.app.VelocityEngine (Velocity 1.7) it's trying to create a new PatternLayout in it's LOG4J logger but it's using the constructor which takes a String and this constructor is not provider by log4j-over-slf4j. It used to "work" well when there was no PatternLayout at all because Velocity catch NoClassDefFoundError but it does not expect a NoSuchMethodError. The workaround (and what should be done anyway) is to provide a SLF4J based custom logger to Velocity. But still it would be nice to mimic a bit better log4j for this use case. -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=280 Thomas Mortagne <thomas.mortagne@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |major -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=280 Christian Trutz <christian.trutz@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christian.trutz@gmail.com --- Comment #1 from Christian Trutz <christian.trutz@gmail.com> 2012-11-05 18:56:32 CET --- Hi Thomas, can you please also post a stack trace with the NoSuchMethodError. I want to reproduce the problem. Christian -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=280 --- Comment #2 from Thomas Mortagne <thomas.mortagne@gmail.com> 2012-11-05 19:03:17 CET --- Created attachment 88 --> http://bugzilla.slf4j.org/attachment.cgi?id=88 Stack trace of the issue Here is the complete stack trace of the issue. The source of org.xwiki.rendering.test.cts.RenderingTest can be found on https://github.com/xwiki/xwiki-rendering/blob/master/xwiki-rendering-test/sr... I added a call to setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, new SLF4JLogChute()); to work around the issue. -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=280 Christian Trutz <christian.trutz@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from Christian Trutz <christian.trutz@gmail.com> 2012-11-05 20:42:46 CET --- org.apache.velocity.runtime.log.Log4JLogChute relies also on following methods: 117 PatternLayout layout = new PatternLayout("%d - %m%n"); 118 this.appender = new RollingFileAppender(layout, file, true); 119 120 // if we successfully created the file appender, 121 // configure it and set the logger to use only it 122 appender.setMaxBackupIndex(1); 123 appender.setMaximumFileSize(100000); 124 125 // don't inherit appenders from higher in the logger heirarchy 126 logger.setAdditivity(false); 127 logger.addAppender(appender); -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=280 Christian Trutz <christian.trutz@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|slf4j-dev@qos.ch |christian.trutz@gmail.com -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@qos.ch