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

default logger settings on LWP::ConsoleLogger::Everywhere import #24

Closed
mjgardner opened this issue Jun 30, 2022 · 4 comments
Closed

default logger settings on LWP::ConsoleLogger::Everywhere import #24

mjgardner opened this issue Jun 30, 2022 · 4 comments

Comments

@mjgardner
Copy link

I like using perl -MLWP::ConsoleLogger::Everywhere foo.pl, but I still have to change code if I want different logger settings. It would be nice if I could set the defaults on import, so I could say perl '-MLWP::ConsoleLogger::Everywhere (logger => Log::Dispatch->new(outputs => [['File', min_level => 'debug', filename => 'foo.log']]))' foo.pl.

And for that particular use case, it would be neat if there was a shortcut settings (log_file?) that would take care of that Log::Dispatch invocation for me, so I could say perl -MLWP::ConsoleLogger::Everywhere=log_file,foo.log foo.pl

@oalders
Copy link
Owner

oalders commented Jun 30, 2022

I think this sounds good. I would accept a patch for it. Will also ping @simbabque who originally wrote Everywhere.

@simbabque
Copy link
Contributor

Very good idea. Maybe we could even have a dot file?

@hakonhagland
Copy link
Contributor

Started on this in #26. Please review!

@oalders
Copy link
Owner

oalders commented Jun 21, 2023

Closed via #28

@oalders oalders closed this as completed Jun 21, 2023
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

4 participants