Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
1.7.25
-
- OS : any
- JDK : 1.8 (or any)
-
enhancement
Description
An exception may occur when converting a message to a string(log4j-over-slf4j/src/main/java/org/apache/log4j/Category.convertToString method).
For example, someone implements message class's toString method incorrect.
Reprodution steps are described as sample project.
Download the project and run command in your console(or IDE) 'mvn clean test', then you can see the test case is failed.
I think it is better to ignore the exception and let the Category(Logger) continue to run - for example, if the exception is occured , then slf4j prints the exception and continues to call appenders with null message object.
As an idea to resolve this problem,
I've modified the slf4j's Category.java code and pull-requested to your slf4j repo(https://github.com/qos-ch/slf4j/pull/175).
Could you comment on this issue?