Asterisk
  1. Asterisk
  2. ASTERISK-20189

add a none rotatestrategy that disables internal log rotation

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Severity: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.13.1
    • Target Release Version/s: None
    • Component/s: Core/General
    • Security Level: None
    • Labels:
      None

      Description

      We are using an external log rotation mechanism and have a need to disable asterisk's internal rotation that kicks in at 1GB.

      The patch I'm about to attach achieves this for us by adding a none strategy on the rotation.

      A further enhancement could be to implement a maxlogsize option, which will enable a user to set the size at which the automatic rotation happens, and when set to 0 disables the size based rotation, but still allow rotation via logger reload. We're not interested in this and want to disable rotation entirely.

      1. asterisk-logger-norotate.patch
        2 kB
        Jaco Kroon
      2. asterisk-logger-norotate.patch
        2 kB
        Jaco Kroon
      3. asterisk-logger-norotate-trunk.patch
        2 kB
        Jaco Kroon

        Activity

        Hide
        Jaco Kroon added a comment -

        Fixed a minor (but critical) bug from previous version. Previous version would have leaked the file descriptors of the log files on rotate.

        Not sure if this can be improved by skipping the entire logchannels list traversal can be skipped.

        Show
        Jaco Kroon added a comment - Fixed a minor (but critical) bug from previous version. Previous version would have leaked the file descriptors of the log files on rotate. Not sure if this can be improved by skipping the entire logchannels list traversal can be skipped.
        Hide
        Rusty Newton added a comment -

        Jaco, Thanks for the contribution! New features and improvements must be written against trunk. Can you provide a patch against trunk?

        Show
        Rusty Newton added a comment - Jaco, Thanks for the contribution! New features and improvements must be written against trunk. Can you provide a patch against trunk?
        Hide
        Jaco Kroon added a comment -

        rediffed against trunk.

        original applied with some fuzz, also this patch will function with -p0 instead of -p1 as recommended by an external source.

        Show
        Jaco Kroon added a comment - rediffed against trunk. original applied with some fuzz, also this patch will function with -p0 instead of -p1 as recommended by an external source.

          People

          • Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development