[
https://issues.apache.org/jira/browse/JCS-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642465#comment-17642465
]
Jeremy Long edited comment on JCS-232 at 12/2/22 1:38 PM:
----------------------------------------------------------
I had to restructure the looping to correctly catch the error without exiting
the loop. See [[PR #|https://github.com/apache/commons-jcs/pull/120.]
[120|https://github.com/apache/commons-jcs/pull/120.]|https://github.com/apache/commons-jcs/pull/120].
I added a bit of excessive debug logging in case others run into issues
implementing a logger.
A binding for `slf4j` will be published to central shortly:
[https://github.com/jeremylong/jcs3-slf4j]
was (Author: [email protected]):
I had to restructure the looping to correctly catch the error without exiting
the loop. See [[PR #|https://github.com/apache/commons-jcs/pull/120.]
[120|https://github.com/apache/commons-jcs/pull/120.]
[||https://github.com/apache/commons-jcs/pull/120.]
[https://github.com/apache/commons-jcs/pull/120|https://github.com/apache/commons-jcs/pull/120.]
[]|https://github.com/apache/commons-jcs/pull/120.]. I added a bit of
excessive debug logging in case others run into issues implementing a logger.
A binding for `slf4j` will be published to central shortly:
[https://github.com/jeremylong/jcs3-slf4j]
> ClassNotFoundException When Using Custom Log Adapter
> ----------------------------------------------------
>
> Key: JCS-232
> URL: https://issues.apache.org/jira/browse/JCS-232
> Project: Commons JCS
> Issue Type: Bug
> Affects Versions: jcs-3.1
> Reporter: Jeremy Long
> Priority: Major
>
> If one implements a new logging abstraction as documented:
> [https://commons.apache.org/proper/commons-jcs/UpgradingFrom2x.html#Logging_Abstraction]
> Unless log4j is on the classpath a ClassNotFoundException exception is thrown
> because `org/apache/logging/log4j/message/MessageFactory` does not exist and
> is referenced
> [https://github.com/apache/commons-jcs/blob/master/commons-jcs-core/src/main/java/org/apache/commons/jcs3/log/Log4j2Factory.java#L30]
>
> I have a library that uses sl4j and is used in several other tools - so I
> thought I would make an adapter to point to slf4j:
> [https://github.com/jeremylong/jcs3-slf4j]. Unfortunately, to use this I will
> have to add an unused dependency.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)