Hi, I just started to play with Dancer. I wanted to see what's going on so I wanted to turn on logging. I found I can say at the top of my Dancer script: set logger => 'file'; set log => 'debug'; and then I can add calls to debug "hello"; and see the output with tail -f MYAPP/logs/development.log but I was hoping 1) to see the logging on the console window just after this message:
Dancer server 25189 listening on http://0.0.0.0:3000 == Entering the development dance floor ...
2) See default debug messages on calling various routes, or missing all routes Can I do these? How? Gabor -- Gabor Szabo http://szabgab.com/
Hi Gabor, and thanks for giving Dancer a try!
I just started to play with Dancer. I wanted to see what's going on so I wanted to turn on logging. I found I can say at the top of my Dancer script:
set logger => 'file'; set log => 'debug';
Indeed.
and then I can add calls to
debug "hello";
and see the output with tail -f MYAPP/logs/development.log
Yes, that's what the default logger (Dancer::Logger::File) does.
but I was hoping
1) to see the logging on the console window just after this message:
Dancer server 25189 listening on http://0.0.0.0:3000 == Entering the development dance floor ...
Hmm, that's an interesting feature, but it's not provided yet by Dancer::Logger::File. This would be very easy to implement though. I think the best way of doing that would be as an option.
2) See default debug messages on calling various routes, or missing all routes
Do you mean debug messages sent y Dancer's core itself? Regards, -- Alexis Sukrieh
On Sun, Apr 4, 2010 at 2:18 PM, Alexis Sukrieh <sukria@sukria.net> wrote:
Yes, that's what the default logger (Dancer::Logger::File) does.
but I was hoping
1) to see the logging on the console window just after this message:
Dancer server 25189 listening on http://0.0.0.0:3000 == Entering the development dance floor ...
Hmm, that's an interesting feature, but it's not provided yet by Dancer::Logger::File. This would be very easy to implement though.
I think the best way of doing that would be as an option.
I though it would be implemented in Dancer::Logger::STDOUT or STDERR and that would work if you set: set logger => 'stderr';
2) See default debug messages on calling various routes, or missing all routes
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) Or "could not find route for request '/xyz/qqrq' " Gabor
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/567ba583771a92b14c88d8c3946b8e0a5427ba0... 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/cacca3da92e28f42ed0bfe9dc298fe20657c1... Feel free to check it out. Regards, -- Alexis Sukrieh
participants (2)
-
Alexis Sukrieh -
Gabor Szabo