Technic1an
Technic1an

Reputation: 2807

How do you write a .txt file`s contents into syslog on a Mac?

I have a .txt file that stores specific query information about Macs, I want this information to be copied or written to the syslog file as well. Essentially I want the contents of the file to be written to the syslog. How would I go about doing this?

Upvotes: 2

Views: 167

Answers (1)

Adrian Frühwirth
Adrian Frühwirth

Reputation: 45646

Use logger (from man logger):

-f, --file file

      Log  the contents of the specified file.
      This option cannot be combined with command-line message.

E.g.:

$ logger -p local0.notice -t MYPROGRAM -f /tmp/myprogram.log

Upvotes: 3

Related Questions