I am trying to configure log4j such that the jms appender is non blocking.
Does this configuration make it non blocking?
appender name=async class=org.apache.log4j.AsyncAppender
param name=BufferSize value=4096 /
param name=blocking value=false/
/appender
appender
I am trying to convert my log4.properties from 1.x to log4j.xml 2.0-rc1 but
I am running into this issue
log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
appender class=org.apache.log4j.appender.TimeAndSizeRollingAppender
name=search-indexer-async
param value=false
The stack trace below shows the code trying to process an XML configuration
with Log4j 1. You cannot have log4j version 1 on the classpath if you want
to use version 2. The XML format between version 1 and 2 is different.
Log4j 2 has a version 1 compatibility module you can use.
Gary
On Wed,
It appears that the dependency jar is trying to use log4j 1. Do you have
any suggestion on how I can resolve this issue? This is my new config and
error follows that:
?xml version=1.0 encoding=UTF-8?
Configuration status=warn name=MyApp packages=
Appenders
RollingFile
I do not have time to dig deeper today, sorry. Maybe someone else will
chirp in...
Gary
On Wed, Apr 2, 2014 at 1:40 PM, Mohit Anchlia mohitanch...@gmail.comwrote:
It appears that the dependency jar is trying to use log4j 1. Do you have
any suggestion on how I can resolve this issue? This is
Your main goal is probably to have the IO (the jms messaging) in a separate
thread from your application. An async appender achieves that.
However AsyncAppender uses a normal java queue to pass log events from one
thread to another. This is a blocking data structure and can become a source of
I don't think there is any problem with that jar, the issue is that I am
trying to use log4j 2 but the dependency jar that I am using is using log4j
1. When I switch back to log4j 1 everything works fine. Is there a way to
avoid this compatibility issue? Not sure how others that have similar
issue
SLF4J finds the two bindings below, but not the log4j2 binding (
*log4j-slf4j-impl-2.0.jar*).
So first you need to add the log4j2 slf4j impl dependency.
Second the classpath will still have the two jars below that also provide a
binding. So whichever comes first in the classpath is the binding