Warnings do not show up in log output when they are fatal #789

Open
Corion opened this Issue May 4, 2012 · 2 comments

2 participants

@Corion

When your code (or code beyond your control) outputs a warning, and you have the setting "warnings: 1" to make warnings fatal, you get an entry in the log output like

[4876]  core @0.008038> [hit #23]response: 500 in C:/strawberry/perl/site/lib/Dancer/Handler.pm l. 179

but no helpfull information at all. The log output should at least include the generated warnings that led up to the fatal error. In fact, whenever Dancer outputs a 500 error, it should include a reason that gets written to the log.

development.yml:
# configuration file for development environment

# the logger engine to use
# console: log messages to STDOUT (your console where you started the
#          application server)
# file:    log message to a file in log/
logger: "console"

# the log level for this environement
# core is the lowest, it shows Dancer's core log messages as well as yours
# (debug, warning and error)
log: "core"

# should Dancer consider warnings as critical errors?
warnings: 1

# should Dancer show a stacktrace when an error is caught?
show_errors: 1

# auto_reload is a development and experimental feature
# you should enable it by yourself if you want it
# Module::Refresh is needed 
# 
# Be aware it's unstable and may cause a memory leak.
# DO NOT EVER USE THAT FEATURE IN PRODUCTION 
# OR TINY KITTENS SHALL DIE WITH LOTS OF SUFFERING
auto_reload: 0

session: 'simple'
@Corion

Whoops - forgot to add the Dancer version

Dancer version 1.3095

I don't have a convenient test case either, sorry.

@leegee

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment