Last active
March 11, 2016 03:04
-
-
Save jsubida/7050a9e77bb54ab6e11f to your computer and use it in GitHub Desktop.
This file contains 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
require 'logger' | |
# Example code for Ruby's Logger module | |
# http://ruby-doc.org/stdlib-2.3.0/libdoc/logger/rdoc/Logger.html | |
log = Logger.new(STDOUT) | |
log.level = Logger::WARN | |
log.unknown("Unknown") # Always log | |
# Logger levels, where fatal is the most severe. | |
# No logs are output whose severity is below log.level. | |
# In this example, log.info and log.debug are not output. | |
log.fatal("Fatal") | |
log.error("Error") | |
log.warn("Warn") | |
log.info("Info") | |
log.debug("Debug") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment