Project

General

Profile

Actions

Bug #14563

closed

System Log - General Log Order Setting is not being respected when using Raw Logs

Added by Fred Lear about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Low
Category:
Logging
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Release Notes:
Default
Affected Plus Version:
23.05.1
Affected Architecture:
All

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.

Actions #1

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
Actions #2

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.

[...]

Actions #3

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.

Actions #4

Updated by Christopher Cope about 2 years ago

  • Status changed from Confirmed to Pull Request Review
Actions #5

Updated by Christopher Cope about 2 years ago

  • Status changed from Pull Request Review to Feedback
  • % Done changed from 0 to 100
Actions #6

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.

Actions

Also available in: Atom PDF