diff options
| author | Roy Marples <roy@marples.name> | 2017-04-11 18:04:03 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2017-04-11 18:04:03 +0100 |
| commit | 61012898c4b90432bcc533158298580591b56c68 (patch) | |
| tree | ad78cfda88b746c9a1f55defc1fe0d72a893fc6e /src/dhcpcd.c | |
| parent | edf7ae1228379b960641c58ba372acb1675532e9 (diff) | |
| download | dhcpcd-61012898c4b90432bcc533158298580591b56c68.tar.xz | |
Write syslog entries in logfile:
date tag[pid]: message
This does add a few more bytes, but it allows for the same log
analysis tools to be used.
When building SMALL, this code is removed and you just get the
message in the logfile.
Diffstat (limited to 'src/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c index e7822dde..e9fbcc50 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1461,7 +1461,8 @@ main(int argc, char **argv) #ifdef INET ctx.udp_fd = -1; #endif - logopts = LOGERR_WLOG; + /* syslog style logging */ + logopts = LOGERR_LOG|LOGERR_LOG_DATE|LOGERR_LOG_TAG|LOGERR_LOG_PID; i = 0; while ((opt = getopt_long(argc, argv, ctx.options & DHCPCD_PRINT_PIDFILE ? NOERR_IF_OPTS : IF_OPTS, @@ -1513,7 +1514,7 @@ main(int argc, char **argv) break; case 'T': i = 1; - logopts &= ~LOGERR_WLOG; + logopts &= ~LOGERR_LOG; break; case 'U': i = 3; |
