Created
May 3, 2011 21:33
-
-
Save bigpresh/954303 to your computer and use it in GitHub Desktop.
Dead simple test case for logging configured at runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[davidp@supernova:~/tmp/runtimeloggerconfig]$ perl runtimeloggerconfig.pl | |
>> Dancer 1.3030 server 19286 listening on http://0.0.0.0:3000 | |
== Entering the development dance floor ... | |
^C | |
# a request was made, answered with the default error 500 page | |
[davidp@supernova:~/tmp/runtimeloggerconfig]$ cat logs/development.log | |
[davidp@supernova:~/tmp/runtimeloggerconfig]$ | |
# Nothing logged. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[davidp@supernova:~/tmp/runtimeloggerconfig]$ cat runtimeloggerconfig.pl | |
#!/usr/bin/perl | |
use Dancer; | |
set logger => 'file'; | |
set log => 'debug'; | |
get '/' => sub { | |
die "Dieing in route handler - arrggghh!"; | |
}; | |
dance; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment