I use log4j 2.9
I have file appenders configured in log4j2.xml.
For example :
all_log_appender, device_appender, sql_appender
all appenders log in different files.
what is a correct way to choose my appenders at runtime in order to decice where (in which file) to log?
To be honest I can't find examples in the documentation. I also tried to extend Logger class but as I understand it's not correct to extend log4j2 logger class because "some layouts require Log4j to walk the stacktrace to report which class and line in your code from the logger was called from"
I can't find any examples how to choose appender at runtiime.
Could you give me a simple example please?