You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jeremy Long (Jira)" <ji...@apache.org> on 2022/11/30 12:58:00 UTC

[jira] [Commented] (JCS-232) ClassNotFoundException When Using Custom Log Adapter

    [ https://issues.apache.org/jira/browse/JCS-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17641286#comment-17641286 ] 

Jeremy Long commented on JCS-232:
---------------------------------

Additionally, the documentation for the logging abstraction is incorrect. The services file should be `org.apache.commons.jcs3.log.LogFactory` instead of `org.apache.commons.jcs.log.LogFactory`

> 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)