about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDuncan Overbruck <mail@duncano.de>2019-09-09 14:43:51 +0200
committerDuncan Overbruck <github@duncano.de>2021-02-12 23:20:41 +0100
commit9ee5b2fc05c58c08e51d0a8577af2b8e857a9894 (patch)
tree00eb7458638a53447145fc7b43564ff25987199a
parentceb8dd4c132be54f421fb255101e503fac42aa58 (diff)
downloadrunit-void-9ee5b2fc05c58c08e51d0a8577af2b8e857a9894.tar.gz
runit-void-9ee5b2fc05c58c08e51d0a8577af2b8e857a9894.tar.xz
runit-void-9ee5b2fc05c58c08e51d0a8577af2b8e857a9894.zip
vlogger: default to daemon.notice if linked as runit log service
-rw-r--r--vlogger.86
-rw-r--r--vlogger.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/vlogger.8 b/vlogger.8
index de26acb..3a6b204 100644
--- a/vlogger.8
+++ b/vlogger.8
@@ -56,7 +56,11 @@ is linked to
 it uses
 .Dq foo
 as
-.Ar tag .
+.Ar tag
+and
+.Dq daemon.notice
+as
+.Ar pri .
 .Pp
 The options are as follows:
 .Bl -tag -width "-f file"
diff --git a/vlogger.c b/vlogger.c
index 64f1a2e..102bbdb 100644
--- a/vlogger.c
+++ b/vlogger.c
@@ -95,6 +95,8 @@ main(int argc, char *argv[])
 			if ((p = strrchr(pwd, '/')) && strncmp(p+1, "log", 3) == 0 &&
 			    (*p = '\0', (p = strrchr(pwd, '/'))) && (*(p+1) != '\0')) {
 				tag = p+1;
+				facility = LOG_DAEMON;
+				level = LOG_NOTICE;
 			}
 		}
 	}