Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Logger to a file other that /var/log/system.log

    Scheduled Pinned Locked Moved Development
    3 Posts 2 Posters 2.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      francisT
      last edited by

      I've looked in the documentation and failed to find an answer to this, if I'm blind please point me to where my google-fu failed. Likewise if its somewhere on these boards.

      I'd like to log certain messages to a different file than the standard system.log. Specifically I want to occasionally put a line in /var/log/filter.log so that I can tell when I last looked at it. I tried the naive

      logger -f /var/log/filter.log "message"
      

      which would work on quite a few BSD & Linux systems but in pfsense 2.0 the -f parameter appears to be ignored and the message is written to system.log no matter what.

      Any assistance much appreciated

      Francis

      1 Reply Last reply
      Reply Quote 0
      • F
        francisT
        last edited by

        OK someone figured this out for me. For others that may be interested the trick is to figure out which syslog facilities/priorities go to the right log file.

        I want filter.log and local0.* goes there so

        
        : logger -p local0.info "this is my test message"
        : clog /var/log/filter.log | tail -1
        Dec 12 05:13:09 pfSense root: this is my test message
        
        
        1 Reply Last reply
        Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          (I was working up a reply, and you responded before I could hit submit… but there is still something I can add:

          You can also control the tag, or get a message in from another command like so:

          echo Hello World | logger -t mytag -p local0.info
          

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply
          Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
          Privacy Policy · Cookie Policy