[slf4j-dev] [Bug 168] New: Category.log(String FQCN, Priority p, Object msg, Throwable t) method throws UnsupportedOperationException
bugzilla-daemon at pixie.qos.ch
bugzilla-daemon at pixie.qos.ch
Thu Feb 25 09:15:47 CET 2010
http://bugzilla.slf4j.org/show_bug.cgi?id=168
Summary: Category.log(String FQCN, Priority p, Object msg,
Throwable t) method throws UnsupportedOperationException
Product: SLF4J
Version: 1.5.x
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: major
Priority: P1
Component: log4j-over-slf4j
AssignedTo: slf4j-dev at qos.ch
ReportedBy: listid at qos.ch
Seth Call reports:
http://www.qos.ch/pipermail/slf4j-user/2010-February/000889.html
It appears that but not certain that a logback appender is invoking a library
using log4j during its initialization which retrieves a NOPLogger.
See
http://www.qos.ch/pipermail/slf4j-user/2010-February/000892.html
Solution is to change the Category.log(String FQCN, Priority p, Object msg,
Throwable t) method from
public void log(String FQCN, Priority p, Object msg, Throwable t) {
int levelInt = priorityToLevelInt(p);
differentiatedLog(null, FQCN, levelInt, msg, t);
}
public void log(String FQCN, Priority p, Object msg, Throwable t) {
int levelInt = priorityToLevelInt(p);
if (locationAwareLogger != null) {
locationAwareLogger.log(null, FQCN, levelInt, convertToString(msg), t);
} else {
throw new UnsupportedOperationException("The logger [" + slf4jLogger
+ "] does not seem to be location aware.");
}
}
--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the slf4j-dev
mailing list