Created
January 23, 2014 09:30
-
-
Save torstello/8575607 to your computer and use it in GitHub Desktop.
ruby::logging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> I hate code like: | |
> logger.log(:debug, "some msg") unless logger.nil? | |
That is why my debugging or logging routines normally look like this | |
``` | |
def logger *args | |
return unless $LOGGING | |
.... | |
end | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment