I am using log4j:2.13 and ORMLite:5.1
I cannot figure out how to disable (or change level) of ORMLite logs without affecting the level of logs on the rest of my application.
ORMLite's documenation states that I should do the following:
log4j.logger.com.j256.ormlite=DEBUG
(source)
Well this doesn't seem to work. I am new to using log4j. Does anyone know the solution?
Here is my log4j2.properties
file:
status = error
name = PropertiesConfig
filters = threshold
filter.threshold.type = ThresholdFilter
filter.threshold.level = debug
appenders = console
appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
rootLogger.level = debug
rootLogger.appenderRefs = stdout
rootLogger.appenderRef.stdout.ref = STDOUT
# Even if I set this to ERROR, log4j continues logging at debug level because I set it above..
log4j.logger.com.j256.ormlite.level = ERROR
No matter what log level I try, it seems that rootLogger.level
takes priority and "overrides" the ormlite setting.