PerlDancer / Dancer

The easiest way to write web applications with Perl (Perl web micro-framework)
http://perldancer.org/
737 stars 209 forks source link

Assume logger => 'console' if -t STDERR #1040

Open Altreus opened 10 years ago

Altreus commented 10 years ago

If -t STDERR, it can be assumed app.pl has been run from the console. If no logging has been configured it would make sense to default to console logging in this situation. That way an app can theoretically be a standalone script and still output errors somewhere.

racke commented 10 years ago

Makes sense to me. I use the following in my standalone scripts:

set logger => 'console';
set logger_format => '%m';
set log => 'warning';