I wanted to log to file as well, not only on the console.
This is useful, e.g., when using jobson in docker to store the log to a volume or to a bind-mounted host directory.
I couldn't find any docs on how to extend the logging parameter in the config.yml file.
By playing around with the config file and checking the errors in the console I saw that jobson uses the dropwizard framework.
I went to the dropwizard docs and I found this solution: https://www.dropwizard.io/0.7.1/docs/manual/configuration.html#logging
So, this works:
logging:
level: INFO
appenders:
- type: file
currentLogFilename: /var/log/myapplication.log
threshold: ALL
archive: true
archivedLogFilenamePattern: /var/log/myapplication-%d.log
archivedFileCount: 5
timeZone: UTC
logFormat: # TODO
It would be great to have an example or at least a reference to this in the docs.
I wanted to log to file as well, not only on the console. This is useful, e.g., when using jobson in docker to store the log to a volume or to a bind-mounted host directory. I couldn't find any docs on how to extend the
logging
parameter in theconfig.yml
file. By playing around with the config file and checking the errors in the console I saw that jobson uses thedropwizard
framework. I went to thedropwizard
docs and I found this solution: https://www.dropwizard.io/0.7.1/docs/manual/configuration.html#logging So, this works:It would be great to have an example or at least a reference to this in the docs.