So instead of what I had, it should be configured like this? <?xml version="1.0" encoding="UTF-8"?> <Configuration status="WARN"> <Appenders> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> </Console> <RollingFile name="RollingFile" fileName="logs/app.log" filePattern="logs/app-%d{MM-dd-yyyy}.log.gz" ignoreExceptions="false"> <PatternLayout> <Pattern>%d %p %c{1.} [%t] %m%n</Pattern> </PatternLayout> <TimeBasedTriggeringPolicy /> </RollingFile> <Failover name="Failover" primary="RollingFile"> <Failovers> <AppenderRef ref="Console"/> </Failovers> </Failover> </Appenders> <Loggers> <Root level="error"> <AppenderRef ref="RollingFile"/> </Root> </Loggers> </Configuration>
I am still seeing errors with this. 2017-07-10 16:43:17,201 main ERROR appender Failover has no parameter that matches element Failovers 2017-07-10 16:43:17,202 main ERROR Null object returned for RollingFile in Appenders. 2017-07-10 16:43:17,207 main ERROR Unable to locate appender "RollingFile" for logger config "root" 2017-07-10 16:43:17,208 main ERROR Unable to locate primary Appender RollingFile I am using this as reference: https://logging.apache.org/log4j/2.0/manual/appenders.html#FailoverAppender On 7/10/17, 3:58 PM, "Remko Popma" <remko.po...@gmail.com> wrote: >Your root logger is referencing the Failover appender directly. It should >reference the RollingFile appender instead. > >Remko > >(Shameless plug) Every java main() method deserves http://picocli.info > >> On Jul 11, 2017, at 4:20, Vina Martin <vina.mar...@connexta.com> wrote: >> >> RollingFile > >--------------------------------------------------------------------- >To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org >For additional commands, e-mail: log4j-user-h...@logging.apache.org >