Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additional parameters for Logger#new #5588

Closed
pynixwang opened this issue Jan 14, 2018 · 2 comments
Closed

additional parameters for Logger#new #5588

pynixwang opened this issue Jan 14, 2018 · 2 comments

Comments

@pynixwang
Copy link

pynixwang commented Jan 14, 2018

https://blog.bigbinary.com/2017/04/10/ruby-2-4-has-added-additional-parameters-for-logger-new.html

require "logger"

log = Logger.new(STDOUT, level = Logger::WARN, formatter = Logger::DEFAULT_FORMATTER, progname = "")
@RX14
Copy link
Contributor

RX14 commented Jan 14, 2018

I actually have wanted to redesign Logger for a while to cover usecases of library logging. For example, a library should just be able to create a logger and log whatever it wants in whatever detail it wants, then there's a centralized place for the application to configure logging level and formatter per-library and globally to define what's seen. Somewhat like the java logging frameworks but not so... bloated.

@ysbaddaden
Copy link
Contributor

Sounds bloated, yeah (and an idea for an experimentation shard), and has nothing to do with configuring the logger with kwargs, in addition to getters/setters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants