Bug #14563
closedSystem Log - General Log Order Setting is not being respected when using Raw Logs
100%
Description
No matter what the "Forward/Reverse Display" option in general System Log settings is set to, the logs are always displayed in forward direction unless changing "Forward/Reverse Display" for each specific log (from "General Logging Options Setting" to "Reverse").
To fix this the following change is required in "src/etc/inc/syslog.inc":
617c617 < $sor = (config_path_enabled('syslog/reverse') || $grepreverse) ? "-r" : ""; --- > $sor = (config_path_enabled('syslog', 'reverse') || $grepreverse) ? "-r" : "";
Not sure if "config_path_enabled('syslog/reverse')" should return the same result as "config_path_enabled('syslog', 'reverse')", but doesn't because some other bug in "config_path_enabled" function.
Updated by Christopher Cope about 2 years ago
I am unable to reproduce this. I have a fresh 23.05.1 install and changing the global option instantly affects all logs without the need to toggle them to Reverse manually. Please attempt to recreate this with a default config.
23.05.1-RELEASE (amd64) built on Wed Jun 28 03:57:27 UTC 2023 FreeBSD 14.0-CURRENT
Updated by Fred Lear about 2 years ago
Thank you for your reply. I have just noticed that the problem happens when using "Raw Logs" format in combination with the Reverse order global option.
Christopher Cope wrote in #note-1:
I am unable to reproduce this. I have a fresh 23.05.1 install and changing the global option instantly affects all logs without the need to toggle them to Reverse manually. Please attempt to recreate this with a default config.
[...]
Updated by Christopher Cope about 2 years ago
- Subject changed from System Log - General Log Order Setting is not being respected to System Log - General Log Order Setting is not being respected when using Raw Logs
- Status changed from New to Confirmed
- Assignee set to Christopher Cope
Thank you for that detail! I was able to confirm that behavior. I'll get the patch submitted shortly.
Updated by Christopher Cope about 2 years ago
- Status changed from Confirmed to Pull Request Review
Updated by Christopher Cope about 2 years ago
- Status changed from Pull Request Review to Feedback
- % Done changed from 0 to 100
Applied in changeset pfsense:7f7d0165a37f0d7d2e0e8e5d1bd4ab2e35fc8ab8.
Updated by Danilo Zrenjanin about 2 years ago
- Status changed from Feedback to Resolved
Tested the patch against:
23.05.1-RELEASE (amd64) built on Wed Jun 28 03:57:27 UTC 2023 FreeBSD 14.0-CURRENT
It fixes the reported issue.
Ticket resolved.