status_logs_settings.php: Add GUI option for syslog format
On FreeBSD 12.x, syslogd now supports a choice for log format:
-O format Select the output format of generated log messages. The values bsd and rfc3164 are used to generate RFC 3164 log messages. The values syslog and rfc5424 are used to generate RFC 5424 log messages, having RFC 3339 timestamps with microsecond precision. The default is to generate RFC 3164 log messages.
This would be useful to have on status_logs_settings.php, defaulting to the stated default value (rfc3164)
Updated by Jim Pingle about 2 years ago
There is a bit more work involved as the log parsers will need updated to deal with the different format:
The time string format is RFC 3339 extended, which does have support in the PHP datetime code if we want to parse it and reformat vs displaying as-is: https://www.php.net/manual/en/class.datetimeinterface.php#datetime.constants.rfc3339_extended
Updated by Russell Morris about 2 years ago
I have RFC 5424 manually running here, to export to my syslog collector. And you're right, the local syslog is not displaying then. Is there a mod you want me to try? More than willing to work on it here also. Is there a particular PHP file you're referring to?
Updated by Jim Pingle almost 2 years ago
- Status changed from Feedback to Resolved
This option has been in and working for a while. No negative side effects that I can see other than #10155 which is being tracked separately.
Logs can be set to either format. Both display in the GUI even when there is a mix of formats in the same log file.
If further problems are discovered they can be tracked in their own separate issues.