Lines 421-426
static bool KeepKernFac; /* Keep remotely logged kernel facility */
Link Here
|
421 |
static bool needdofsync = true; /* Are any file(s) waiting to be fsynced? */ |
421 |
static bool needdofsync = true; /* Are any file(s) waiting to be fsynced? */ |
422 |
static struct pidfh *pfh; |
422 |
static struct pidfh *pfh; |
423 |
static bool RFC3164OutputFormat = true; /* Use legacy format by default. */ |
423 |
static bool RFC3164OutputFormat = true; /* Use legacy format by default. */ |
|
|
424 |
static bool RFC3164OutputFormatStrict = false; /* Use recommended format. */ |
424 |
|
425 |
|
425 |
struct iovlist; |
426 |
struct iovlist; |
426 |
|
427 |
|
Lines 722-727
main(int argc, char *argv[])
Link Here
|
722 |
else if (strcmp(optarg, "syslog") == 0 || |
723 |
else if (strcmp(optarg, "syslog") == 0 || |
723 |
strcmp(optarg, "rfc5424") == 0) |
724 |
strcmp(optarg, "rfc5424") == 0) |
724 |
RFC3164OutputFormat = false; |
725 |
RFC3164OutputFormat = false; |
|
|
726 |
else if (strcmp(optarg, "strict") == 0 || |
727 |
strcmp(optarg, "rfc3164-strict") == 0) |
728 |
RFC3164OutputFormat = RFC3164OutputFormatStrict = true; |
725 |
else |
729 |
else |
726 |
usage(); |
730 |
usage(); |
727 |
break; |
731 |
break; |
Lines 2053-2059
fprintlog_rfc3164(struct filed *f, const char *hostname, const char *app_name,
Link Here
|
2053 |
iovlist_append(&il, priority_number); |
2057 |
iovlist_append(&il, priority_number); |
2054 |
iovlist_append(&il, ">"); |
2058 |
iovlist_append(&il, ">"); |
2055 |
iovlist_append(&il, timebuf); |
2059 |
iovlist_append(&il, timebuf); |
2056 |
if (strcasecmp(hostname, LocalHostName) != 0) { |
2060 |
if (RFC3164OutputFormatStrict) { |
|
|
2061 |
iovlist_append(&il, " "); |
2062 |
iovlist_append(&il, hostname); |
2063 |
} |
2064 |
else if (strcasecmp(hostname, LocalHostName) != 0) { |
2057 |
iovlist_append(&il, " Forwarded from "); |
2065 |
iovlist_append(&il, " Forwarded from "); |
2058 |
iovlist_append(&il, hostname); |
2066 |
iovlist_append(&il, hostname); |
2059 |
iovlist_append(&il, ":"); |
2067 |
iovlist_append(&il, ":"); |