How can I configure Logback to log different levels for a logger to different destinations?
For example, given the following Logback configuration, will Logback reco
No programming needed. configuration make your life easy.
Below is the configuration which logs different level of logs to different files
INFO
%d{yyyy-MM-dd HH:mm:ss} %-5level - %msg%n
${DEV_HOME}/app-error.log
%d{yyyy-MM-dd HH:mm:ss} %-5level - %msg%n
${DEV_HOME}/archived/app-error.%d{yyyy-MM-dd}.%i.log
10MB
ERROR
ACCEPT
DENY
${DEV_HOME}/app-info.log
%d{yyyy-MM-dd HH:mm:ss} %-5level - %msg%n
${DEV_HOME}/archived/app-info.%d{yyyy-MM-dd}.%i.log
10MB
INFO
ACCEPT
DENY
${DEV_HOME}/app-debug.log
%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
${DEV_HOME}/archived/app-debug.%d{yyyy-MM-dd}.%i.log
10MB
DEBUG
ACCEPT
DENY
${DEV_HOME}/app.log
%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
${DEV_HOME}/archived/app.%d{yyyy-MM-dd}.%i.log
10MB