diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2014-07-19 12:41:06 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2014-07-19 12:41:06 +0200 |
commit | b01b3a1c2e6e762f6114d14e2a500a778a7b6a1d (patch) | |
tree | 25e12ddfaf0f271d214f3b67536b19d85b613339 | |
parent | b12542661ca847090465c30351871ee4947f9e3b (diff) | |
download | socklog-void-b01b3a1c2e6e762f6114d14e2a500a778a7b6a1d.tar.gz socklog-void-b01b3a1c2e6e762f6114d14e2a500a778a7b6a1d.tar.xz socklog-void-b01b3a1c2e6e762f6114d14e2a500a778a7b6a1d.zip |
add syslog-stripdate
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | syslog-stripdate | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile index 3ae7574..4f96b6e 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ all: nanoklogd install: all install -Dm755 nanoklogd ${DESTDIR}/usr/bin/nanoklogd install -Dm755 svlogtail ${DESTDIR}/usr/bin/svlogtail + install -Dm755 syslog-stripdate ${DESTDIR}/usr/bin/syslog-stripdate mkdir -p ${DESTDIR}/etc ${DESTDIR}/var/log cp -a sv ${DESTDIR}/etc cp -a socklog ${DESTDIR}/var/log diff --git a/syslog-stripdate b/syslog-stripdate new file mode 100755 index 0000000..cb84619 --- /dev/null +++ b/syslog-stripdate @@ -0,0 +1,8 @@ +#!/bin/sh +# syslog-stripdate - remove superfluous timestamp from socklog->svlogd +# +# 2014-07-19T10:20:24.52892 user.notice: Jul 19 12:20:24 xbps-install: ... +# turns to +# 2014-07-19T10:20:24.52892 user.notice: xbps-install: ... + +sed 's/^\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9] [a-z]*\.[a-z]*:\) ... [0-9 ][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] /\1 /' |