[#79440] [Ruby trunk Bug#13188] Reinitialize Ruby VM. — shyouhei@...
SXNzdWUgIzEzMTg4IGhhcyBiZWVuIHVwZGF0ZWQgYnkgU2h5b3VoZWkgVXJhYmUuCgoKTWFydGlu
6 messages
2017/02/06
[#79441] Re: [Ruby trunk Bug#13188] Reinitialize Ruby VM.
— SASADA Koichi <ko1@...>
2017/02/06
On 2017/02/06 10:10, shyouhei@ruby-lang.org wrote:
[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>
Hi,
15 messages
2017/02/15
[#79541] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/15
Em 15-02-2017 05:05, Daniel Ferreira escreveu:
[#79543] Re: Immutable Strings vs Symbols
— Daniel Ferreira <subtileos@...>
2017/02/16
Hi Rodrigo,
[#79560] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/16
Em 15-02-2017 22:39, Daniel Ferreira escreveu:
[ruby-core:79709] [Ruby trunk Feature#13244] stdlib/Logger: add option: level
From:
eike@...
Date:
2017-02-23 03:22:04 UTC
List:
ruby-core #79709
Issue #13244 has been reported by Eike Dierks.
----------------------------------------
Feature #13244: stdlib/Logger: add option: level
https://bugs.ruby-lang.org/issues/13244
* Author: Eike Dierks
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
I'd like to suggest
to enhance the interface of stdlib/logger
The #new method should allow for an option to set the log level:
~~~
Logger#new(logdev, level:'WARN')
~~~
As with ruby 2.4 there is no provision to set the log level from #new
But insted the level attribute needs to be set on the Logger object.
This leads to code like:
~~~
def logger
unless @logger
@logger ||= Logger.new(STDERR)
logger.level = 'WARN'
end
return logger
end
~~~
while by it would be much more expressive to write:
~~~
def logger
@logger ||= Logger.new(STDERR, level:'WARN')
end
~~~
I believe this would not break any previous usage of the api.
--
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>