java - how can i dynamically, on a per thread basis, change the loglevel using slf4j/logback -
i have application running inside tomcat6 servlet container using slf4j log4j although switching logback imminent.
the application makes heavy use of hibernate, , time being need hibernate sql logging turned on.
however, there 1 code path makes tons of repetitive (and boring) calls hibernate , produces tons of logging.
i'd able change loglevel specific logger, have happen executing thread.
i've read mdc, seems can used add additional "labels" on per-thread basis, not change actual logging levels specific loggers.
is doable?
maybe can implement filter ignores events coming specific thread. , said can identify source thread using mdc.
Comments
Post a Comment