Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

man vlogger: incorrect documentation regarding the default tag and facility #84

Open
jdbourbaki opened this issue Nov 30, 2021 · 1 comment

Comments

@jdbourbaki
Copy link

The vlogger (8) man page) says:

-p pri
The pri can be facility.level or just facility.
...
The default is user.notice.

And later:

-t tag

Defines the openlog 3 ident which is used as prefix for each log message or passed as first argument to /etc/vlogger.

The default is the LOGNAME environment variable.

The statements about the default facility and tag are incorrect. In particular, the default tag does not in any way depend on the LOGNAME environment variable.

The actual defaults are:

Facility: "notice" unless vlogger detects that it was exec'd as "./run" from within the directory "runsvdir/service/log" where "runsvdir" is an arbitrary path and "service" an arbitrary directory name -- in that case the default facility is "daemon".

tag: if vlogger detects that it was exec'd as "./run" from within the directory "runsvdir/service/log" where "runsvdir" is an arbitrary path and "service" an arbitrary directory name then the default tag is the name of the service directory. Otherwise, if vlogger is calling /etc/vlogger then the default tag is an empty string, while if vlogger is logging to a socket then the default tag is the current username as reported by getlogin().

@Goorzhel
Copy link
Contributor

Goorzhel commented Aug 6, 2022

Both the facility and tag differences for $SV/log/run are covered:

If vlogger is executed as a log service for runit(8) or another daemontools like supervision suite it uses the service name as default tag. As example if vlogger is linked to /var/service/foo/log/run it uses “foo” as tag and “daemon.notice” as pri.

I don't see vlogger.c using LOGNAME but @Duncaen will have better insight than me about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants