houseabsolute / Log-Dispatch

Dispatches messages to one or more outputs
https://metacpan.org/release/Log-Dispatch/
Other
12 stars 29 forks source link

Add set_min_level() method #28

Open autarch opened 7 years ago

autarch commented 7 years ago

Migrated from rt.cpan.org #22901 (status was 'open')

Requestors:

Attachments:

From markstos@cpan.org on 2006-11-08 15:21:09:

( I may submit a patch for this later as tuits permit ).

In a large system it can be useful to have "debug" turned on for one part, but not the whole thing.

Therefore, it's useful to be able set a global "min_level" through the constructor, but override that later, at least temporarily.

A simple method like set_min_level($level) could do this.

It would be neat if there was an option for this declaration to go out of scope and automatically revert to the previous value, but I don't see that feature as required.

Mark

autarch commented 7 years ago

From markstos@cpan.org on 2006-11-14 22:48:42:

On Wed Nov 08 10:21:09 2006, MARKSTOS wrote:

( I may submit a patch for this later as tuits permit ).

In a large system it can be useful to have "debug" turned on for one part, but not the whole thing.

Therefore, it's useful to be able set a global "min_level" through the constructor, but override that later, at least temporarily.

A simple method like set_min_level($level) could do this.

A patch is attached for this, which includes code, test and doc updates.

Mark

autarch commented 7 years ago

From markstos@cpan.org on 2006-11-15 19:31:12:

Hmm, while I successfully added a "min_level()" method to the Log::Dispatch::Output, I really meant to add one to Log::Dispatch. It's less clear to me how to do that in a way that is "clean" within the overall design. I'm going to keep thinking about the best way to solve the case I've run into.

Mark

autarch commented 7 years ago

From ether@cpan.org (@karenetheridge) on 2012-05-14 20:29:32:

min_level now exists; this ticket should be closed.

autarch commented 7 years ago

From drolsky@cpan.org (@autarch) on 2012-07-26 14:25:03:

On Mon May 14 16:29:32 2012, ETHER wrote:

min_level now exists; this ticket should be closed.

The request was for a setter. All that exists now is a getter.

markstos commented 7 years ago

Hello, I was the original bug reporter 10 years ago. I got a new job that doesn't use much Perl and don't use this module so feel free to close this feature request since no else added a "me too" comment in the last 10 years.

martinvonwittich commented 6 years ago

I'm looking for exactly this, and now I'm disappointed that it's not implemented :/

autarch commented 6 years ago

@martinvonwittich If you want to turn the patch into a PR I can take a look.

martinvonwittich commented 6 years ago

@autarch sorry, ain't nobody got time for that :/