Project

General

Profile

Todo #9711

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 about 2 months ago. Updated about 2 months ago.

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

100%

Estimated time:

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 = '')

Associated revisions

Revision 03cdd6ad (diff)
Added by Jim Pingle about 2 months ago

Add log compression type option. Issue #9711

Revision 8a86d7be (diff)
Added by Jim Pingle about 2 months ago

Move log rotation options to their own section. Issue #9711

While here, fix log size description to fit new behavior.

Revision 7d918dab (diff)
Added by Jim Pingle about 2 months ago

Fix log size text in common log settings. Issue #9711

Revision a40c9cf2 (diff)
Added by Jim Pingle about 2 months ago

Log rotation settings. Issue #9711 and Issue #9712

  • Add rotation count GUI option and per-log option
  • Add settings for packages to override more fields not supported in the
    GUI

Revision c63ae216 (diff)
Added by Jim Pingle about 2 months ago

Fix rotation count check. Issue #9711

While here, fixup default static newsyslog entries. Issue #8350

History

#1 Updated by Jim Pingle about 2 months 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.

#2 Updated by Jim Pingle about 2 months 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.

Also available in: Atom PDF