houseabsolute / Log-Dispatch

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

Add format #59

Open PhilippSoehnlein opened 4 years ago

PhilippSoehnlein commented 4 years ago

Log::Dispatch::Config has a nice format option which I would like to see in Log::Dispatch directly.

In my case I'd like to have a screen logger that prepends log messages with the time and the log level. I know this can be done with adding a callback, but since Log::Dispatch::Config provides such a convenient option, it would be nice when something like it would be directly available in all Log::Dispatch outputs.

autarch commented 4 years ago

Hi, Philipp, this seems like a good thing to add. Would you be up for creating a PR? I think the best way to implement this would be to translate the format into a callback, just to keep the internals simpler.