I have a program in which I'm using slf4j with logback for logging and there is different type of logging pattern for clients and developers, like below:
if(userType.equals("clients")){
encoder.setPattern("[%5level] - %date{dd MMM yyyy;HH:mm:ss.SSS} : %message%n");
}else{
encoder.setPattern("[%5level] - %date{dd MMM yyyy;HH:mm:ss.SSS} [%thread]: %message%n");
}
But I cannot apply the above code using configuration file because it won't give me the feasibility to do it. Now I have applied markers in the logs and want to print only those logs which have marker in them. And for that I need to use configuration file. Is there any way in which I can print the logs with markers without using the configuration file.