Class BcdSqlLogger


  • public class BcdSqlLogger
    extends java.lang.Object
    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 
      Constructor Description
      BcdSqlLogger()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void reset()
      resets logging switch for current thread, which is usually:enabled
      static void setLevel​(org.apache.logging.log4j.Level newLevel)
      sets the current logging level to use by BcdStatementWrapper to log sqls, until the invocation of reset()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BcdSqlLogger

        public BcdSqlLogger()
    • Method Detail

      • 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 of reset()
        Parameters:
        newLevel -
      • reset

        public static void reset()
        resets logging switch for current thread, which is usually:enabled