[
https://issues.apache.org/jira/browse/MESOS-2193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14247601#comment-14247601
]
Benjamin Mahler commented on MESOS-2193:
----------------------------------------
Zookeeper does expose the following:
{code}
/**
* \brief sets the stream to be used by the library for logging
*
* The zookeeper library uses stderr as its default log stream. Application
* must make sure the stream is writable. Passing in NULL resets the stream
* to its default value (stderr).
*/
ZOOAPI void zoo_set_log_stream(FILE* logStream);
{code}
However, google logging does not appear to expose it's underlying {{FILE*}}
handles. When {{--log_dir}} is provided, we could possibly {{fopen()}} the log
file used by glog pass it to the zookeeper library, relying on line buffering
to avoid interleaving. I haven't looked into it further.. :)
I think we should support stderr logging, the above is an independent
suggestion to properly support {{--log_dir}}.
> serve an externally managed log via the web ui
> ----------------------------------------------
>
> Key: MESOS-2193
> URL: https://issues.apache.org/jira/browse/MESOS-2193
> Project: Mesos
> Issue Type: Improvement
> Components: webui
> Reporter: David Robinson
> Priority: Minor
>
> Mesos includes various 3rd party libraries which use logging libraries other
> than glog. This means that glog-produced logs don't show a complete story --
> they lack messages from 3rd party libraries. The zookeeper library doesn't
> use glog, it logs to stdout/stderr and in a different format to the rest of
> Mesos, yet its logs are critical for troubleshooting production issues.
> A complete story can be obtained by configuring Mesos to log to stdout/stderr
> -- this captures and aggregates output from Mesos and its various libraries.
> Mesos has support for viewing master/slave's logs from the web ui but the
> feature is only available when the --log_dir option is used. For the reasons
> above it's not always possible(/recommended) to use the option. It's also not
> possible to use the --log_dir option (eg, to be able to rotate logs) but
> disable log viewing in the web ui (eg, for security reasons).
> Either the 3rd party libraries should be modified to use glog so there's a
> single logging framework (preferred), or Mesos should be modified so its web
> ui can serve an externally managed log.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)