Guest User

Untitled

a guest
Jan 11th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // Somehow detect the current logging level here?
  2. System.LoggingLevel level = LoggingLevel.FINEST;
  3.  
  4. if(level == LoggingLevel.FINEST) {
  5. // Extra logging code that may make additional SOQL calls, etc...
  6. // that you don't want during standard execution.
  7. System.debug(logginglevel.INFO, level);
  8. }
  9.  
  10. // Normally, suppress messages
  11. LoggingLevel myLogLevel = LoggingLevel.NONE;
  12. System.debug(myLogLevel,'A debug message that does not interest me today');
  13. ...
  14. LoggingLevel myLogLevel = LoggingLevel.DEBUG;
  15. System.debug(myLogLevel,'A debug message that I want to see today');
Add Comment
Please, Sign In to add comment