Announcement

Collapse
No announcement yet.

Logfile Rotation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logfile Rotation

    Folks,

    Few dats ago I added FR24 feed to my existing Flightaware setup on a Raspberry Pi. All seems to be working OK but examining the settings page on <local address>:8754 I notice the logfile mode says keep up to 48 hours, rotate every 24 hours. Location of logfile is correct.

    Mine is now nearly 5 days old and around 9MB in size.

    Geoff

  • #2
    I don't think anyone has ever got it to work.

    Most turn it off to stop filing up and killing SD card.

    Only really need for diagnostic issues

    Sent from my XT1092 using Tapatalk
    Posts not to be taken as official support representation - Just a helpful uploader who tinkers

    Comment


    • #3
      This works for me:

      in the file /etc/logrotate.d/fr24feed

      Code:
      /var/log/fr24feed/*.log {
           daily
           missingok
           rotate 5
           compress
           su fr24 fr24
           create 0644 fr24 fr24
           copytruncate
           notifempty
           postrotate
               if
                 /bin/systemctl status fr24feed.service > /dev/null ; then \
                 /bin/systemctl restart fr24feed.service > /dev/null; \
               fi;
           endscript
      }

      Comment


      • #4
        Thanks SlashbNL - I'll give that a try.

        Geoff

        Comment


        • #5
          Fingers crossed someone with access to the distro code takes notice
          Posts not to be taken as official support representation - Just a helpful uploader who tinkers

          Comment


          • #6
            Thanks @SlashbNL working good here too

            Maybe another one for @abcd567 to add to "the thread of all knowledge"

            Comment


            • #7
              Thanks @SlashbNL, turns out that I did *NOT* have the logrotate configuration file in the logrotate.d directory, go figure out why!

              I have now created the file and look forward to see it doing its magic.

              The real question now is, what about the logfile rotation setting in the web interface to fr24feed? Is that even taken into consideration? I very much doubt it...

              Thanks,

              Luca

              Comment


              • #8
                If you want a logfile set it to either 1 (keep 48hrs rotate every 24) or 2 (keep 72 hrs rotate every 24). These 2 settings will make the feeder send messages to the logfile, just the rotation does not work out of the box. If you disable it there will not be a log.

                Comment


                • #9
                  Originally posted by SlashbNL View Post
                  If you want a logfile set it to either 1 (keep 48hrs rotate every 24) or 2 (keep 72 hrs rotate every 24). These 2 settings will make the feeder send messages to the logfile, just the rotation does not work out of the box. If you disable it there will not be a log.
                  I see, it's just a UI design flaw in the settings page, then, as I could not understand how a setting in the fr24feed software could influence a system daemon setting like that of logrotate.

                  Many thanks for the clarification!

                  Luca

                  Comment

                  Working...
                  X