Closed mindscratch closed 7 years ago
It appears the docs are out of date, Chronos is using java.util.logging
. A custom logging properties file can be set by setting the JVM_OPTS
env variable. In the marathon json for running chronos, I added:
"env": {
"JVM_OPTS": "-Djava.util.logging.config.file=/mnt/mesos/sandbox/logging.properties"
}
Actually, trying to provide a custom logging.properties doesn't seem to be working either.
Turns out, since chronos uses chaos, you have to configure logback (the logging library used by chaos).
I created a custom logback.xml file which I added to the fetch
portion of my marathon app configuration. I then configured logback to use my file by adding this to my marathon json:
"env": {
"JVM_OPTS": "-Dlogback.configurationFile=/mnt/mesos/sandbox/logback.xml"
}
I'm using Marathon to run Chronos (specifically the Chronos docker image).
Following the recommendation on the debugging page, I added "-Dlog4j.configuration=file:///mnt/mesos/sandbox/log4j.properties" to the "args" section of the Marathon configuration.
When Chronos starts up it fails with:
How can I specify a custom log4j properties file?