I\'m working on a simple desktop app (not webapp).
Here is my log4j.properties
:
log4j.rootCategory=INFO, stdout
log4j.appender.stdout=o
You can disable all debug logs by just calling the below code at start of your application. And you can enable or disable at any point of time by setting log type.
ch.qos.logback.classic.Logger logger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
logger.setLevel(Level.toLevel("error"));