In this recipe, we will configure logging options that will allow us to debug the state of Mesos.
We will assume Mesos is available on localhost port
5050. The steps provided here will work for either master or agents.
When Mesos is installed from pre-built packages, the logs are by default stored in
/var/log/mesos/. When installing from a source build, storing logs is disabled by default. To change the log store location, we need to edit
/etc/default/mesos and set the
LOGS variable to the desired destination. For some reason,
mesos-init-wrapper does not transfer the contents of
/etc/mesos/log_dir to the
--log_dir flag. That's why we need to set the log's destination in the environment variable.
Remember that only Mesos logs will be stored there. Logs from third-party applications (for example, ZooKeeper) will still be sent to
Changing the default logging level can be done in one of two ways: by specifying the
--logging_level flag or...