Project

General

Profile

Actions

Bug #12238

closed

Logger writes progname if log message is nil

Added by Soilent (Konstantin x) over 9 years ago. Updated about 9 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
[ruby-core:74755]

Description

Please consider the following example:

logger = Logger.new($stdout)

# Log message is nil
logger.info
# I, [2016-03-31T22:04:36.684636 #4019]  INFO -- : nil

logger.progname = 'prog'

# Now log message is changed to progname, is this a bug?
logger.info
# I, [2016-03-31T22:04:51.418510 #4019]  INFO -- prog: prog

logger.info 'test'
# I, [2016-03-31T22:05:03.345434 #4019]  INFO -- prog: test

Logger writes progname if log message is nil. Is this a bug or a known feature?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0