send a message to syslog system

Text in this font/color apply to the xxxx version

logger [ -isdhV ] [-n server] [-P port] [-f file] [-p pri | fac.lvl] [-t tag] [-u socket]

Command interface to send messages to the syslog daemon which deals with them as per syslog.conf.


  1. Run myUpdater.sh
  2. Send a syslog notice that it ran containing the last line of the stdout
  3. Send the log file to the syslog with a priority of info
  4. If there return code indicated a problem,
    send the stderr to syslog with priority of error
    myUpdater.sh 1> /tmp/myUpdater.log 2> /tmp/myupdater.err
     tail -n1 /tmp/myUpdater.log | logger -p local3.notice 
     logger -p local3.info -f /tmp/myUpdater.log
    if [ $rc != 0 ]; then  
     logger -p local3.err  -f /tmp/myUpdater.err -s 

    Use UDP datagram. Default TCP.
    not builtin syslod
    -i process id of the logger process
    -s Log the message to standard error, as well as the system log.
    -f file Enter the contents of file into the log.
    -p pri Enter the message with the specified priority.
    -p facility.level The priority may be specified numerically or as a
    facility.level pair.
    -p local3.info level in the local3 facility.
    The default is user.notice.
    -t tag tag line .
    -u socket Write to socket instead of builtin syslog routines. (port 514)
    -d Use a datagram instead of a stream connection to this socket.
    -- End of options, (allows message to start with a hyphen (-)).
    if no message is specified standard input is logged
    exits 0 on success, and >0 if an error occurs.

    facilities: cron, ftp, lpr, kern, mail, news, syslog, uucp,
    auth, authpriv (for security information of a sensitive nature),security(deprecated synonym for auth),
    daemon, user, local0, 1 … 6, local7
    levels: emerg, panic, alert, crit, err, error, warning, warn, notice, info, debug

    logger System rebooted

    logger -p local0.notice -t HOSTIDM -f rootStatNotes

    For the priority order and intended purposes of these levels, See syslog(BSDactually Mac OSX ; darwin), syslogd(8)

    syslog(3), syslogd(8)

    Made true HTML and terse by Dennis German