I guess I am not understanding what you want.
Here's what is in my log:
2016-02-16 16:31:36,337 main DEBUG Building Plugin[name=failovers,
class=org.apache.logging.log4j.core.appender.FailoversPlugin].
2016-02-16 16:31:36,337 main DEBUG createFailovers(={STDERR})
2016-02-16 16:31:36,337 main DEBUG Building Plugin[name=appender,
class=org.apache.logging.log4j.core.appender.FailoverAppender].
2016-02-16 16:31:36,340 main ERROR appender Failover has no parameter that
matches element Failovers
2016-02-16 16:31:36,340 main DEBUG createAppender(name="Failover",
primary="RollingRandomAccessFile", ={[STDERR]},
retryIntervalSeconds="null", Configuration(log4j2.server.xml), Filter=null,
ignoreExceptions="null")
2016-02-16 16:31:36,340 main DEBUG Building Plugin[name=appenders,
class=org.apache.logging.log4j.core.config.AppendersPlugin].
2016-02-16 16:31:36,341 main DEBUG
createAppenders(={RollingRandomAccessFile, STDERR, Failover primary=null,
failover={STDERR}})
2016-02-16 16:31:36,342 main DEBUG Building Plugin[name=AppenderRef,
class=org.apache.logging.log4j.core.config.AppenderRef].
2016-02-16 16:31:36,342 main DEBUG createAppenderRef(ref="Failover",
level="null", Filter=null)
2016-02-16 16:31:36,342 main DEBUG Building Plugin[name=root,
class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
2016-02-16 16:31:36,344 main DEBUG createLogger(additivity="null",
level="ALL", includeLocation="null", ={Failover}, ={},
Configuration(log4j2.server.xml), Filter=null)
2016-02-16 16:31:36,345 main DEBUG Building Plugin[name=loggers,
class=org.apache.logging.log4j.core.config.LoggersPlugin].
2016-02-16 16:31:36,346 main DEBUG createLoggers(={root})
2016-02-16 16:31:36,347 main DEBUG Configuration
XmlConfiguration[location=/opt/twc/ecp/log4j2.server.xml] initialized
2016-02-16 16:31:36,347 main DEBUG Starting configuration
XmlConfiguration[location=/opt/twc/ecp/log4j2.server.xml]
2016-02-16 16:31:36,348 main DEBUG Started configuration
XmlConfiguration[location=/opt/twc/ecp/log4j2.server.xml] OK.
2016-02-16 16:31:36,349 main TRACE Stopping
org.apache.logging.log4j.core.config.DefaultConfiguration@3339ad8e...
2016-02-16 16:31:36,349 main TRACE DefaultConfiguration notified 1
ReliabilityStrategies that config will be stopped.
2016-02-16 16:31:36,349 main TRACE DefaultConfiguration stopping root
LoggerConfig.
2016-02-16 16:31:36,350 main TRACE DefaultConfiguration notifying
ReliabilityStrategies that appenders will be stopped.
2016-02-16 16:31:36,350 main TRACE DefaultConfiguration stopping remaining
Appenders.
2016-02-16 16:31:36,350 main DEBUG Shutting down OutputStreamManager
SYSTEM_OUT.false-1
2016-02-16 16:31:36,351 main TRACE DefaultConfiguration stopped 1 remaining
Appenders.
2016-02-16 16:31:36,351 main TRACE DefaultConfiguration cleaning Appenders
from 1 LoggerConfigs.
2016-02-16 16:31:36,351 main DEBUG Stopped
org.apache.logging.log4j.core.config.DefaultConfiguration@3339ad8e OK
2016-02-16 16:31:36,411 main TRACE Reregistering MBeans after reconfigure.
Selector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector@57250572
2016-02-16 16:31:36,412 main TRACE Reregistering context (1/1):
'AsyncContext@17f052a3'
org.apache.logging.log4j.core.async.AsyncLoggerContext@5609159b
2016-02-16 16:31:36,414 main TRACE Unregistering but no MBeans found
matching 'org.apache.logging.log4j2:type=AsyncContext@17f052a3'
2016-02-16 16:31:36,414 main TRACE Unregistering but no MBeans found
matching 'org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=StatusLogger'
2016-02-16 16:31:36,415 main TRACE Unregistering but no MBeans found
matching 'org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=ContextSelector'
2016-02-16 16:31:36,415 main TRACE Unregistering but no MBeans found
matching 'org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=Loggers,name=*'
2016-02-16 16:31:36,416 main TRACE Unregistering but no MBeans found
matching 'org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=Appenders,name=*'
2016-02-16 16:31:36,416 main TRACE Unregistering but no MBeans found
matching 'org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=AsyncAppenders,name=*'
2016-02-16 16:31:36,417 main TRACE Unregistering but no MBeans found
matching 'org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=AsyncLoggerRingBuffer'
2016-02-16 16:31:36,417 main TRACE Unregistering but no MBeans found
matching 'org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=Loggers,name=*,subtype=RingBuffer'
2016-02-16 16:31:36,419 main DEBUG Registering MBean
org.apache.logging.log4j2:type=AsyncContext@17f052a3
2016-02-16 16:31:36,421 main DEBUG Registering MBean
org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=AsyncLoggerRingBuffer
2016-02-16 16:31:36,423 main DEBUG Registering MBean
org.apache.logging.log4j2:type=AsyncContext@17f052a3,component=StatusLogger
2016-02-16 16:31:36,424 main DEBUG Registering MBean
org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=ContextSelector
2016-02-16 16:31:36,426 main DEBUG Registering MBean
org.apache.logging.log4j2:type=AsyncContext@17f052a3,component=Loggers,name=
2016-02-16 16:31:36,427 main DEBUG Registering MBean
org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=Appenders,name=STDERR
2016-02-16 16:31:36,428 main DEBUG Registering MBean
org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=Appenders,name=Failover
2016-02-16 16:31:36,428 main DEBUG Registering MBean
org.apache.logging.log4j2:type=AsyncContext@17f052a3
,component=Appenders,name=RollingRandomAccessFile
2016-02-16 16:31:36,431 main TRACE Using default SystemClock for timestamps.
2016-02-16 16:31:36,432 main TRACE Using DummyNanoClock for nanosecond
timestamps.
2016-02-16 16:31:36,432 main DEBUG Reconfiguration complete for
context[name=AsyncContext@17f052a3] at URI /opt/twc/ecp/log4j2.server.xml
(org.apache.logging.log4j.core.async.AsyncLoggerContext@5609159b) with
optional ClassLoader: null
2016-02-16 16:31:36,433 main DEBUG Shutdown hook enabled. Registering a new
one.
2016-02-16 16:31:36,434 main DEBUG LoggerContext[name=AsyncContext@17f052a3,
org.apache.logging.log4j.core.async.AsyncLoggerContext@5609159b] started OK.
2016-02-16 16:31:36,436 main TRACE Using default SystemClock for timestamps.
2016-02-16 16:31:36,437 main DEBUG AsyncLogger.ThreadNameStrategy=CACHED
Here's my config:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Used by every process -->
<Configuration status="info" name="log4j2.xml" monitorInterval="60">
<Appenders>
<Socket name="local_process_socket" host="ecplogger" port="6000"
protocol="UDP" immediateFail="false" immediateFlush="true"
reconnectionDelayMillis="1000" connectTimeoutMillis="10000"
ignoreExceptions="false">
<SerializedLayout/>
</Socket>
<!-- Don't forget to set system property
-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
-DAsyncLogger.ExceptionHandler=com.twc.ctg.ecp.service.EcpExceptionHandler
-->
<Async name="local_process_async" blocking="false"
shutdownTimeout="5000" bufferSize="4096" errorRef="STDERR"
ignoreExceptions="false" includeLocation="true">
<AppenderRef ref="local_process_socket"/>
</Async>
<Console name="STDERR" target="SYSTEM_ERR">
<PatternLayout pattern="%d{ISO8601} %-14mdc{application}
%-5level [%t] %logger - %msg%n"></PatternLayout>
</Console>
<Failover name="local_failover" primary="local_process_async">
<Failovers>
<AppenderRef ref="STDERR"/>
</Failovers>
</Failover>
</Appenders>
<Loggers>
<Logger name="com.google" level="error"/>
<Root level="debug">
<AppenderRef ref="local_failover"/>
</Root>
</Loggers>
</Configuration>
On Thu, Feb 18, 2016 at 2:02 PM, Gary Gregory <[email protected]>
wrote:
> What about the rest please?
>
> Gary
>
> On Thu, Feb 18, 2016 at 12:30 PM, Tara Czutno <[email protected]>
> wrote:
>
> > I did provide the exact error message:
> > "ERROR appender Failover has no parameter that matches element Failovers"
> >
> > On Thu, Feb 18, 2016 at 10:32 AM, Apostolis Giannakidis <
> > [email protected]> wrote:
> >
> > > Tara,
> > >
> > > I think that it would be useful to provide us with the exact error
> > message
> > > that you see, your exact configuration and versions as well as the
> exact
> > > steps that one must perform to reproduce the same behavior.
> > >
> > > On Thu, Feb 18, 2016 at 5:28 PM, Tara Czutno <
> [email protected]>
> > > wrote:
> > >
> > > > I am trying to use Failover Appender but got an error message.
> > > >
> > > > ERROR appender Failover has no parameter that matches element
> Failovers
> > > >
> > > > I saw this bug https://issues.apache.org/jira/browse/LOG4J2-878.
> > > >
> > > > Is FailoverAppender working but just printing out an incorrect error
> > > > message
> > > > - OR -
> > > > Is FailoverAppender not working and I should not be using it until it
> > is
> > > > fixed.
> > > >
> > >
> >
>
>
>
> --
> E-Mail: [email protected] | [email protected]
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>