make log level check for debug/performance logging consistent to avoid unnecessary operations