[#75225] [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7) — k@...
Issue #12324 has been reported by Kazuki Yamaguchi.
6 messages
2016/04/27
[#78693] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
k@rhe.jp wrote:
[#78701] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Kazuki Yamaguchi <k@...>
2016/12/17
On Sat, Dec 17, 2016 at 01:31:12AM +0000, Eric Wong wrote:
[#78702] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
Kazuki Yamaguchi <k@rhe.jp> wrote:
[ruby-core:74868] [Ruby trunk Feature#12224] logger: Allow specifying log level in constructor
From:
sonots@...
Date:
2016-04-10 14:08:03 UTC
List:
ruby-core #74868
Issue #12224 has been updated by Naotoshi Seo. Assignee set to Naotoshi Seo ---------------------------------------- Feature #12224: logger: Allow specifying log level in constructor https://bugs.ruby-lang.org/issues/12224#change-57996 * Author: Kazuki Yamaguchi * Status: Open * Priority: Normal * Assignee: Naotoshi Seo ---------------------------------------- When I use Logger class, I very often (or maybe always) set minimal log level together. Since method chaining can't be used for setters, we have to split it into two statements: ~~~ruby logger = Logger.new($stdout) logger.level = :info ~~~ Imagine if the `logger` was much longer name, such as ActiveRecord::Base.logger. I personally don't want to repeat it. I found a number of samples on GitHub (they would countain copy-and-pastes though) [1]. So I propose adding a new keyword argument `level` to Logger.new: ~~~ruby logger = Logger.new($stdout, level: :info) ~~~ This will be effectively same as the original code I indicated above. I attached a patch for this. [1] https://github.com/search?utf8=%E2%9C%93&q=%22%3D+Logger.new%22+%22level+%3D%22+language%3ARuby&type=Code&ref=searchresults ---Files-------------------------------- 0001-lib-logger.rb-allow-specifying-log-level-via-Logger..patch (2.25 KB) -- 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>