Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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);
- }
- // Normally, suppress messages
- LoggingLevel myLogLevel = LoggingLevel.NONE;
- System.debug(myLogLevel,'A debug message that does not interest me today');
- ...
- LoggingLevel myLogLevel = LoggingLevel.DEBUG;
- System.debug(myLogLevel,'A debug message that I want to see today');
Add Comment
Please, Sign In to add comment