You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Carter Kozak (Jira)" <ji...@apache.org> on 2020/09/24 14:18:01 UTC
[jira] [Commented] (LOG4J2-2935) Log4j 2 Mixing sync and async
logging issue.
[ https://issues.apache.org/jira/browse/LOG4J2-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17201556#comment-17201556 ]
Carter Kozak commented on LOG4J2-2935:
--------------------------------------
Hi [~Manasaj], log4j2 2.8.2 is relatively old at this point, could you try again with log4j 2.13.3 and a newer release of disruptor (I use 3.4.2 [https://mvnrepository.com/artifact/com.lmax/disruptor/3.4.2] )
> Log4j 2 Mixing sync and async logging issue.
> --------------------------------------------
>
> Key: LOG4J2-2935
> URL: https://issues.apache.org/jira/browse/LOG4J2-2935
> Project: Log4j 2
> Issue Type: Task
> Components: Configuration
> Affects Versions: 2.8.2
> Reporter: Manasa
> Priority: Major
> Attachments: log4j.properties
>
>
> I'm trying to add the below line in log4j2. properties file. Added disruptor 3.0.0 in my jars path.
> logger.rolling.type=AsyncLogger
> But its throwing the below error.Can you please help to resolve this.
> INFO | jvm 1 | 2020/09/24 05:19:34 | 2020-09-24 05:19:34,195 Log4j2-TF-117-ConfiguratonFileWatcher-74 ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.async.AsyncLoggerConfig for element AsyncLogger: java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory java.lang.reflect.InvocationTargetException
> INFO | jvm 1 | 2020/09/24 05:19:34 | at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at java.lang.reflect.Method.invoke(Method.java:498)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:964)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:904)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:548)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.LoggerContext.onChange(LoggerContext.java:672)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.config.ConfiguratonFileWatcher$ReconfigurationRunnable.run(ConfiguratonFileWatcher.java:68)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at java.lang.Thread.run(Thread.java:748)
> INFO | jvm 1 | 2020/09/24 05:19:34 | Caused by: java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.config.AbstractConfiguration.getAsyncLoggerConfigDelegate(AbstractConfiguration.java:203)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.async.AsyncLoggerConfig.<init>(AsyncLoggerConfig.java:91)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.apache.logging.log4j.core.async.AsyncLoggerConfig.createLogger(AsyncLoggerConfig.java:273)
> INFO | jvm 1 | 2020/09/24 05:19:34 | ... 14 more
> INFO | jvm 1 | 2020/09/24 05:19:34 | Caused by: java.lang.ClassNotFoundException: com.lmax.disruptor.EventFactory cannot be found by org.apache.logging.log4j.core_2.11.2
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
> INFO | jvm 1 | 2020/09/24 05:19:34 | at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> INFO | jvm 1 | 2020/09/24 05:19:34 | ... 17 more
--
This message was sent by Atlassian Jira
(v8.3.4#803005)