Text in this font/color apply to the xxxx version

logger [ -isdhV ] [-n server] [-P port] [-f file] [-p pri] [-t tag] [-u socket]
                     [message]

Provides a command interface to send messages to the syslog daemon who will decide where they should be forwarded to.

example:

  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
  5. 
    myUpdater.sh 1> /tmp/myUpdater.log 2> /tmp/myupdater.err
    rc=$?
     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 
    fi 

    -d
    --udp
    Use UDP datagram. Default TCP.
    -n
    --server
    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)

    June 6, 1993 4.3 Berkeley Distribution

    Made true HTML and terse by Dennis German