Class BcdSqlLogger
java.lang.Object
de.businesscode.util.jdbc.wrapper.BcdSqlLogger
global switch for internal bcd connection wrapper class, which is not globally exposed.
The BcdSqlLogger is for internal usage and may temporary disable sql logging for internal
classes, usage:
BcdSqlLogger.setLevel(Level.TRACE); try{ ... } finally { BcdSqlLogger.reset(); // resets the default level; it is very important to call this method here to prevent threadlocal leaking ... }per default the programmatic switch is always enabled, as user controls sql logging solely via log4j configuration. This flag cascades FALSE yet does not enforce logging in case is disabled by log4j configuration.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BcdSqlLogger
public BcdSqlLogger()
-
-
Method Details
-
setLevel
public static void setLevel(org.apache.logging.log4j.Level newLevel) sets the current logging level to use by BcdStatementWrapper to log sqls, until the invocation ofreset()
- Parameters:
newLevel
-
-
reset
public static void reset()resets logging switch for current thread, which is usually:enabled
-