Is it possible to check the current LoggingLevel in Apex code and conditionally vary the execution?
E.g.
// Somehow detect the current logging level here?
System.LoggingLevel level = LoggingLevel.FINEST;
if(level == LoggingLevel.FINEST) {
// Extra logging code that may make additional SOQL calls, etc...
// that you don't want during standard execution.
System.debug(logginglevel.INFO, level);
}