You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Niklas Quarfot Nielsen (JIRA)" <ji...@apache.org> on 2013/10/03 18:58:41 UTC

[jira] [Commented] (MESOS-588) Add option to master to send stdout and stderr to syslog

    [ https://issues.apache.org/jira/browse/MESOS-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13785341#comment-13785341 ] 

Niklas Quarfot Nielsen commented on MESOS-588:
----------------------------------------------

One way to go about this, which doesn't require external wrapper scripts, is to create custom streams for stderr/stdout.

We should be able to output to:
1) Actual stderr/stdout along with
2a) External file, or
2b) Syslog

On BSD-flavored systems, we can use fwopen (http://www.unix.com/man-page/FreeBSD/3/fwopen/) and on Linux fopencookie (http://man7.org/linux/man-pages/man3/fopencookie.3.html).
With those two calls, we provide custom call backs for stream writes.

If this sounds reasonable to you, I should be able to have a patch ready soon.


> Add option to master to send stdout and stderr to syslog
> --------------------------------------------------------
>
>                 Key: MESOS-588
>                 URL: https://issues.apache.org/jira/browse/MESOS-588
>             Project: Mesos
>          Issue Type: Story
>          Components: master
>            Reporter: Jason Dusek
>   Original Estimate: 49h 7m
>  Remaining Estimate: 49h 7m
>
> Sending worker logs to Syslog simplifies implementation of retention policies and makes it easier for teams to devise their own approach to log indexing and authorized use of logs (since many of these solutions exist for Syslog already).
> In Bash, we can write a wrapper that uses redirection and process substitution to ensure a command invocation's STDOUT and STDERR are written to syslog.
> https://gist.github.com/solidsnack/6090947
> It would be nice if Mesos offered such a facility, or provided a way to plugin a wrapper script like the one above.



--
This message was sent by Atlassian JIRA
(v6.1#6144)