Dancer2
Dancer2 copied to clipboard
Issues with configuration
As indicated in #1583, there's some ambiguity on where the config.yml file would go. But additionally, there're a few issues:
- Some settings simply do not seem to work.
portis simply ignored, for instance. Apparently,content_typetoo. - There seems to be some dependence on where the
loggerdirective is placed, which, a YAML file being declarative, probably should not. - When using a configuration file, additional settings seem to be ignored.
port: 31415
content_type: "application/json"
engines:
logger:
File:
log_level: core
file_name: "hitos.log"
logger: "File"
followed by set log_dir => '/tmp' is simply ignored.
set log_dir => '/tmp' sets a top-level config key, but that's not where the one you want to override is.
Thanks for the answer. Where is it, then?
Hi JJ
set sets top-level configuration values. I don;t know if it can be used to set subvalues.
But config returns a hashref which you can change.
config->{engines}{logger}{File}{file_name} = 'new.log';
I do not recommend this approach, but rather using the config files properly. Let's see if we can get you straightened out in your other issue ? (And maybe we can consolidate to one open issue?)