Skip to content
Advertisement

main ERROR Unable to locate appender “test” for logger config “test”

This is my log4j2 `JSON config

JavaScript

when I use one file appenders it works fine. when I use two file appenders getting the error mention in the title.cant we add more than 1 file appenders. I don’t want to use a rolling file appender.

Java code for creating logger variables

JavaScript

Advertisement

Answer

Try to define your appenders using type attribute like below –

JavaScript

For this, You have to modify all appender configuration using type attribute. Your complete configuration file will change like below –

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement