Last active
December 12, 2015 08:18
-
-
Save julio-saito-linx/4742516 to your computer and use it in GitHub Desktop.
Ruby's standard logger
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' | |
# intializing | |
@log = Logger.new(STDOUT) | |
@log.level = Logger::INFO | |
@log = Logger.new(STDOUT) | |
# logging | |
@log.level = Logger::INFO | |
@log.debug("Created logger") | |
@log.warn("Created logger") | |
@log.info("Program started") | |
@log.error("Nothing to do!") | |
@log.fatal("Nothing to do!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment