Logger: simple refactoring
* lib/logger.rb (Logger#level=): remove unnecessary local variable. * lib/logger.rb (Logger#initialize, Logger#reopen): [DOC] mention the default values. cherrypicked from [GH-1319]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
39330d6b79
commit
84d818678f
@ -1,3 +1,11 @@
|
|||||||
|
Wed Apr 6 10:56:15 2016 Anton Davydov <antondavydov.o@gmail.com>
|
||||||
|
|
||||||
|
* lib/logger.rb (Logger#level=): remove unnecessary local
|
||||||
|
variable.
|
||||||
|
|
||||||
|
* lib/logger.rb (Logger#initialize, Logger#reopen): [DOC] mention
|
||||||
|
the default values. cherrypicked from [GH-1319].
|
||||||
|
|
||||||
Wed Apr 6 10:17:53 2016 cremno phobia <cremno@mail.ru>
|
Wed Apr 6 10:17:53 2016 cremno phobia <cremno@mail.ru>
|
||||||
|
|
||||||
* math.c (ruby_lgamma_r): missing/lgamma_r.c is used on Windows,
|
* math.c (ruby_lgamma_r): missing/lgamma_r.c is used on Windows,
|
||||||
|
@ -251,8 +251,7 @@ class Logger
|
|||||||
if severity.is_a?(Integer)
|
if severity.is_a?(Integer)
|
||||||
@level = severity
|
@level = severity
|
||||||
else
|
else
|
||||||
_severity = severity.to_s.downcase
|
case severity.to_s.downcase
|
||||||
case _severity
|
|
||||||
when 'debug'.freeze
|
when 'debug'.freeze
|
||||||
@level = DEBUG
|
@level = DEBUG
|
||||||
when 'info'.freeze
|
when 'info'.freeze
|
||||||
@ -335,9 +334,10 @@ class Logger
|
|||||||
# +STDOUT+, +STDERR+, or an open file).
|
# +STDOUT+, +STDERR+, or an open file).
|
||||||
# +shift_age+::
|
# +shift_age+::
|
||||||
# Number of old log files to keep, *or* frequency of rotation (+daily+,
|
# Number of old log files to keep, *or* frequency of rotation (+daily+,
|
||||||
# +weekly+ or +monthly+).
|
# +weekly+ or +monthly+). Default value is 0.
|
||||||
# +shift_size+::
|
# +shift_size+::
|
||||||
# Maximum logfile size (only applies when +shift_age+ is a number).
|
# Maximum logfile size (only applies when +shift_age+ is a number). Default
|
||||||
|
# value is 1MiB.
|
||||||
#
|
#
|
||||||
# === Description
|
# === Description
|
||||||
#
|
#
|
||||||
@ -364,7 +364,8 @@ class Logger
|
|||||||
#
|
#
|
||||||
# +logdev+::
|
# +logdev+::
|
||||||
# The log device. This is a filename (String) or IO object (typically
|
# The log device. This is a filename (String) or IO object (typically
|
||||||
# +STDOUT+, +STDERR+, or an open file).
|
# +STDOUT+, +STDERR+, or an open file). reopen the same filename if
|
||||||
|
# it is +nil+, do nothing for IO. Default is +nil+.
|
||||||
#
|
#
|
||||||
# === Description
|
# === Description
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user