[ruby-core:75005] [Ruby trunk Bug#12238][Rejected] Logger writes progname if log message is nil

From: sonots@...
Date: 2016-04-18 09:02:56 UTC
List: ruby-core #75005
Issue #12238 has been updated by Naotoshi Seo.

Status changed from Open to Rejected

----------------------------------------
Bug #12238: Logger writes progname if log message is nil
https://bugs.ruby-lang.org/issues/12238#change-58136

* Author: Konstantin /
* Status: Rejected
* Priority: Normal
* Assignee: Naotoshi Seo
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Please consider the following example:

``` ruby
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?



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next