I agree too. This is a great idea. Thanks.
El 4/4/2017 22:18, "Chris Brannon" <notifications@github.com> escribi=C3=B3=
:
> Looks good!
> I'd love to see this merged.
>
> =E2=80=94
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/voidlinux/void-runit/pull/65#issuecomment-291619616=
>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AA0fqeRcHlwAkot9k7Rr=
f7eq4UzFDEWOks5rsqWtgaJpZM4MQGst>
> .
>
-- =
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/voidlinux/void-runit/pull/65#issuecomment-291751257=
I really think this is overkill, as proper logging services are already
supported by runit. as part of sv-helper I include rsvlog which is meant to
be symlinked as <service>/log/run, and it allows some handy configuration
of svlogd. Take a look and let me know what you think. It's what i've been
using for logging with runit services for > 8 years.
Tj
On Wed, Mar 1, 2017 at 11:36 AM, Duncan Overbruck <notifications@github.com>
wrote:
> vlogger(8) is a alternative to logger(1), by default it sends messages
> from stdin to syslog.
>
> The main reason to replace logger(1) is, that logger only connects once to
> the syslog socket in default mode and puts all messages into the void if
> syslog is not running at the time.
> logger(1) has a new --socket-errors=3Don mode which would work, but some
> void uses don't use syslog at all and in this case the log service would
> constantly restart.
>
> As a bonus vlogger(8) looks for /etc/vlogger and if its executable it
> just executes it and is replaced by it.
> This can be used to avoid syslog and just write all logs to files with
> svlogd(8) as example without having to edit all log files for each
> service.
>
> VLOGGER(8) System Manager's Manual VLOGG=
ER(8)
>
> NAME
> vlogger =E2=80=93 log messages to syslog or an arbitrary executable
>
> SYNOPSIS
> vlogger [-p priority] [-t tag]
>
> DESCRIPTION
> By default, vlogger reads lines from stdin and sends them to syslog.=
If
> the file /etc/vlogger exists and is executable it is executed with t=
ag as
> only argument and replaces vlogger.
>
> If vlogger is executed as a log service for runit or another daemont=
ools
> like supervision suit it uses the service name as default tag. As
> example if vlogger is linked to /var/service/foo/log/run it uses foo=
as
> default tag.
>
> -p priority
> The. priority can be facility.level or just facility. See
> FACILITIES, LEVELS or syslog(3). The default is daemon.info.
>
> -t tag Defines the openlog(3) ident which is used as prefix for eac=
h log
> message or passed as first argument to /etc/vlogger.
>
> FACILITIES
> auth
> authpriv
> cron
> daemon
> ftp
> kern can not be used from userspace replaced with daemon.
> lpr
> mail
> news
> syslog
> user
> uucp
> local[0-7]
> security deprecated synonym for auth.
>
> LEVELS
> emerg
> alert
> crit
> err
> warning
> notice
> info
> debug
> panic deprecated synonym for emerg.
> error deprecated synonym for err.
> warn deprecated synonym for warning.
>
> FILES
> /etc/vlogger
> An optional executable file that is used to to handle the
> messages. It is executed with tag as first argument and rep=
laces
> the vlogger process.
>
> EXIT STATUS
> The vlogger utility exits 0 on success, and >0 if an error occurs.
>
> EXAMPLES
> /etc/vlogger:
>
> #!/bin/sh
> exec svlogd /var/log/$1
>
> SEE ALSO
> logger(1), syslog(3), svlogd(8)
>
> HISTORY
> This program is a replacement for the logger utility provided by
> util-linux.
>
> AUTHOR
> Duncan Overbruck <mail@duncano.de>
>
> LICENSE
> vlogger is in the public domain.
>
> To the extent possible under law, the creator of this work has waive=
d all
> copyright and related or neighboring rights to this work.
>
> http://creativecommons.org/publicdomain/zero/1.0/
>
> Linux March 1, 2017 =
Linux
>
> ------------------------------
> You can view, comment on, or merge this pull request online at:
>
> https://github.com/voidlinux/void-runit/pull/65
> Commit Summary
>
> - Add vlogger(8)
>
> File Changes
>
> - *M* .gitignore
> <https://github.com/voidlinux/void-runit/pull/65/files#diff-0> (1)
> - *M* Makefile
> <https://github.com/voidlinux/void-runit/pull/65/files#diff-1> (2)
> - *A* vlogger.8
> <https://github.com/voidlinux/void-runit/pull/65/files#diff-2> (138)
> - *A* vlogger.c
> <https://github.com/voidlinux/void-runit/pull/65/files#diff-3> (111)
>
> Patch Links:
>
> - https://github.com/voidlinux/void-runit/pull/65.patch
> - https://github.com/voidlinux/void-runit/pull/65.diff
>
> =E2=80=94
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/voidlinux/void-runit/pull/65>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAAawFEBvrbVoJqAKSs99z=
yoZ8ciZmVuks5rhcjagaJpZM4MQGst>
> .
>
--=20
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/voidlinux/void-runit/pull/65#issuecomment-291856311=
I found a couple more issues with vlogger in its current state.
It was possible for tag to be uninitialized.
Symlinking vlogger to foo/log/run didn't work as expected, because
runsv doesn't use an absolute pathname when running the service.
Instead, it changes to the service directory and executes ./run.
I fixed them both, on the vlogger branch of CMB/void-runit.
I'd like to open the can of worms here and ask if this can be an OSI recognized license instead of cc0. As I've learned recently cc0 is incredibly hard to deal with for US based contributors in certain states.
@Duncaen good point, I'd somehow missed that entirely. As that's a separate issue, we can handle it in another thread. At this point I've got no remaining requests for this before merge.
:shipit: