Skip to content

Add log_ compat methods #814

Closed
wants to merge 2 commits into from

3 participants

@ambs
PerlDancer member
ambs commented Jul 31, 2012

One (final?) step towards easy universal plugins (working with both versions of dancer) would be an universal way of logging.

One problem with Dancer 2 logging is the use of log keyword, as I already pointed sometimes.

Matt Trout defends the use of Log::Contextual and it seems that some other are tempted as well (@xsawyerx at least, if I am not mistaken).

The few I could learn for some minutes looking to Log::Contextual, it works with log_$level and a subroutine reference. With that in mind, I wrote five methods in Dancer::Plugin to solve that.

If you all think this might work, I'll merge this, and work on integrating Log::Contextual on Dancer 2.

Feedback is welcome (@sukria, @dams, @bigpresh, @franckcuny, Matt...)

@ambs ambs was assigned Jul 31, 2012
@ambs ambs More compatibility
It is not that difficult, so, give a little more compatibility with
Log::Contextual.
802423a
@xsawyerx
PerlDancer member
xsawyerx commented Aug 5, 2012

How would Log::Contextual look like in Dancer 2?

@ambs
PerlDancer member
ambs commented Aug 6, 2012

I would expect to, at least, make 5 similar methods like these available in Dancer 2. But, not sure. Some brainstorming is always welcome.

@bigpresh
PerlDancer member

This seems sane to me, and has been waiting for some time - anyone object to it being merged?

@ambs
PerlDancer member
ambs commented Mar 6, 2015

No longer relevant. Long live Dancer2.

@ambs ambs closed this Mar 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.