I have a java application which is using log4j configured as below.
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1
log4j.debug=false
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %c %x - %m%n
#log4j.appender.A1.threshold=DEBUG
# DEBUG, INFO, WARN, ERROR, FATAL
log4j.category.com.myorganization.MyClass=INFO
log4j.category.com.myorganization.MyOtherClass=WARN
I would like to migrate to log4j2 with the same configuration as above. While I have found lots of documentation, especially Migrating from log4j to log4j2 - properties file configuration none of the examples contain category configuration as I have it in the last two lines.
Please can anyone help me out how would be my log4j2.properties file with the same configuration above ?