Skip to content

Commit

Permalink
Add additional parameters for Logger#new
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija authored and asterite committed Jan 21, 2018
1 parent 4c2f6f6 commit e83e894
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/logger.cr
Expand Up @@ -18,6 +18,9 @@
# log = Logger.new(STDOUT)
# log.level = Logger::WARN
#
# # or
# log = Logger.new(STDOUT, level: Logger::WARN)
#
# log.debug("Created logger")
# log.info("Program started")
# log.warn("Nothing to do!")
Expand Down Expand Up @@ -107,10 +110,7 @@ class Logger

# Creates a new logger that will log to the given *io*.
# If *io* is `nil` then all log calls will be silently ignored.
def initialize(@io : IO?)
@level = Severity::INFO
@formatter = DEFAULT_FORMATTER
@progname = ""
def initialize(@io : IO?, @level = Severity::INFO, @formatter = DEFAULT_FORMATTER, @progname = "")
@closed = false
@mutex = Mutex.new
end
Expand Down

0 comments on commit e83e894

Please sign in to comment.