[Dancer-users] Debugging and logging

Alexis Sukrieh sukria at sukria.net
Sun Apr 4 14:36:47 UTC 2010


Le dimanche 04 avril 2010 à 14:25 +0300, Gabor Szabo a écrit :
> I though it would be implemented in Dancer::Logger::STDOUT or STDERR
> and that would work if you set:
> 
> set logger => 'stderr';

That's another way of doing that, but then you won't be able to have
both behaviours at once: either you have log message in logs/$env.log or
in stderr

Anyway, I like the idea and implemented Dancer::Logger::Console in the
1.18-devel branch:

http://github.com/sukria/Dancer/blob/567ba583771a92b14c88d8c3946b8e0a5427ba02/lib/Dancer/Logger/Console.pm

You see how simple it is to write a logger engine ;)

> > Do you mean debug messages sent y Dancer's core itself?
> 
> Yes. So I can see messages like
> 
> "entering route /abc/:name"
> "time spend in route /abc/:name  0.03 sec"   (when exiting it)

I see, then I guess we should add a new level of logging messages, like
"core", and make Dancer's core send messages on this channel.

This is what I did in the 1.18-devel branch:
http://github.com/sukria/Dancer/commit/cacca3da92e28f42ed0bfe9dc298fe20657c1b40

Feel free to check it out.

Regards,

-- 
Alexis Sukrieh



More information about the Dancer-users mailing list