Project

General

Profile

Actions

Todo #9711

closed

Todo #8350: Remove clog in favor of standard syslogd or syslogd alternative with rotation via newsyslog or logrotate

Add GUI options to control log rotation

Added by Jim Pingle over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Logging
Target version:
Start date:
08/30/2019
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:

Description

Some backend options are already supported as of #8350 but there should be GUI options to control log rotation parameters. This should be on status_logs_settings.php and from per-log tabs

Man page for reference: https://www.freebsd.org/cgi/man.cgi?query=newsyslog.conf&apropos=0&sektion=0&manpath=FreeBSD+12.0-RELEASE+and+Ports&arch=default&format=html

  • Count (Default = 7)
  • Size (Default = <configured default log size>, * to disable size rotate) * This option is already present in both places, but it's worth noting that the old setting was total size of logs, and this is max size of the current log, rotated copies are not counted against the limit.
  • When (Default = * to disable time rotate) * The newsyslog time/date format doesn't really lend itself to a GUI, so that may be more trouble than it's worth. If the user wants to do this, we may just take whatever they put in. * Restricted ISO 8601 format for changing at specific times is: @[[[[[cc]yy]mm]dd][T[hh[mm[ss]]]]] * Relative Day/Week/Month is also possible with $[Dhh], $[Ww[Dhh]], and $[Mdd[Dhh]]
  • Flags (Default = JC (bzip2, create if it doesn't exist)) * There are lots of available flags, see the man page. Might need to prevent the use of non-bzip compressions, or do a check before reading the logs with bzcat which is currently used unconditionally.
  • pidpath (Default = '')
  • signal (Default = '')
Actions #1

Updated by Jim Pingle over 4 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

The time, flags, pid/cmd, and signal fields are not necessary for the GUI, the others are sufficient. There is a mechanism for packages to set the more advanced fields if they need them.

Actions #2

Updated by Jim Pingle over 4 years ago

The compression is configurable now but it is a global only option and NOT a per-log setting. While it may be possible to support that, it seemed like a lot more trouble than it's worth.

The rotation count is configurable per-log, like the size.

Actions #3

Updated by Jim Pingle about 4 years ago

  • Status changed from Feedback to Resolved

This appears to be operating as expected. Can address any new problems in separate issues.

Actions

Also available in: Atom PDF