Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [SOLVED] How can I write to system.log from a shell script?

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 292 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.
    • G
      guardian Rebel Alliance
      last edited by guardian

      I have a custom shell script, and I would like to be able to write a message to system.log. Is there a way to do this?

      If you find my post useful, please give it a thumbs up!
      pfSense 2.7.2-RELEASE

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Using logger.

        For example:

        # Fan control loop
        logger Fan control started
        

        Or

        echo "Fan control started" | logger
        

        Steve

        G 1 Reply Last reply Reply Quote 2
        • G
          guardian Rebel Alliance @stephenw10
          last edited by guardian

          @stephenw10 Thanks - that is exactly what I need!

          If you find my post useful, please give it a thumbs up!
          pfSense 2.7.2-RELEASE

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.