[dancer-users] State of Dancer2 debugging support?
Warren Young
warren at etr-usa.com
Mon Feb 10 22:54:57 GMT 2014
Do the 'show_errors' and 'traces' config settings work in Dancer2?
I ask because I have both set in my environment/development.yml file,
but I am still seeing it render 500 errors using public/500.html, rather
than the custom error screen the docs claim.
I have verified that the development.yml file is being read by putting
unparseable junk in it, which prevents my app from starting, as
expected. Also, I put this at the top of the route handler I'm having
trouble with:
debug "Dancing on the ", (config->{'environment'}), " dancefloor.";
It does say "development".
By the way, the 'startup_info' configuration flag is documented as
showing the "dancefloor" in the banner, but I only get this here:
Dancer2 v0.11 server 19360 listening on http://0.0.0.0:30000
I wouldn't have needed to add this 'debug' call if the banner did show
the dancefloor as documented.
Here are my 3 config files, slightly sanitized:
config.yml:
appname: "MyApp"
charset: "UTF-8"
environment: "development"
port: 30000
session: "simple"
template: "Xslate"
engines:
session:
Simple:
cookie_name: "myapplogin"
cookie_duration: "30 days"
session_duration: 3600
environments/development.yml:
logger: "Console"
warnings: 1
show_errors: 1
startup_info: 1
traces: 1
engines:
logger:
Console:
log_level: core
environments/production.yml:
log: "warning"
logger: "File"
warnings: 0
show_errors: 0
route_cache: 1
Not to pile on, but it seems that changing 'environment' to 'production'
in config.yml doesn't do anything. The errors still keep going to the
console instead of a log file, and the verbosity level doesn't drop to
'warning'.
The 'debug' line I added to my problem route does show up, and it says
'production'. The fact that this happens at 'debug' level corroborates
my claim that the verbosity level isn't changing.
More information about the dancer-users
mailing list