Project

General

Profile

Actions

Todo #9712

closed
JP JP

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

Add code for packages to set their own log rotation parameters

Todo #9712: Add code for packages to set their own log rotation parameters

Added by Jim Pingle about 7 years ago. Updated over 6 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

Currently there is code for log rotation but there isn't a way for packages to influence how that rotation is handled without using their own custom newsyslog config file.

The existing code for logging uses a format in the package info.xml file like this:

        <logging>
            <logsocket>/tmp/haproxy_chroot/var/run/log</logsocket>
            <facilityname>haproxy</facilityname>
            <logfilename>haproxy.log</logfilename>
        </logging>

That needs to be extended to support the rotation parameters mentioned in #9711

JP Updated by Jim Pingle about 7 years ago Actions #1

For reference, the supported fields are now:

<logging>
    <facilityname>programname</facilityname>
    <logfilename>filename.log</logfilename>
    <logowner>root:wheel</logowner>
    <logmode>600</logmode>
    <rotatecount>7</rotatecount>
    <logfilesize>512000</logfilesize>
    <rotatetime>@T00</rotatetime>
    <rotateflags>p</rotateflags>
    <pidcmd>/var/run/program.pid</pidcmd>
    <signal>30</signal>
</logging>

These tags go into the package info.xml file. See haproxy and tinc for examples.

JP Updated by Jim Pingle about 7 years ago Actions #2

  • Status changed from New to Feedback

JP Updated by Jim Pingle about 7 years ago Actions #3

  • % Done changed from 0 to 100

JP Updated by Jim Pingle over 6 years ago Actions #5

  • 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