HHH-7908 Logging level checking

Optimization for isDebugEnabled and isTraceEnabled