syslogd: NetBSD/FreeBSD -T option, log remote msgs with local time

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-11-13 16:16:23 +01:00
parent 12fa1f6682
commit c465f340bc
2 changed files with 11 additions and 1 deletions

View File

@ -13,7 +13,7 @@
.Nd System Log Daemon
.Sh SYNOPSIS
.Nm
.Op Fl ?46Adnsv
.Op Fl ?46AdnsTv
.Op Fl a Ar addr[/len][:port]
.Op Fl a Ar name[:port]
.Op Fl b Ar addr[:port]
@ -233,6 +233,11 @@ is 5.
Operate in secure mode. Do not log messages from remote machines. If
specified twice, no network socket will be opened at all, which also
disables logging to remote machines.
.It Fl T
Always use the local time and date for messages received from the
network, instead of the timestamp field supplied in the message by the
remote host. This is useful if some of the originating hosts cannot
keep time properly or are unable to generate a correct timestamp.
.It Fl v
Print
.Nm

View File

@ -233,6 +233,7 @@ int usage(int code)
" -s Operate in secure mode, do not log messages from remote machines.\n"
" If specified twice, no socket at all will be opened, which also\n"
" disables support for logging to remote machines.\n"
" -T Use local time and date for all messages recived from remote hosts.\n"
" -? Show this help text\n"
" -v Show program version and exit\n"
"\n"
@ -336,6 +337,10 @@ int main(int argc, char *argv[])
SecureMode++;
break;
case 'T':
RemoteAddDate = 1;
break;
case 'v':
printf("syslogd v%s\n", VERSION);
exit(0);