How to use logger command on Sierra? I'm trying to log events/check-points from my shell-script using logger.

How to use logger or syslog utility in OS X (version 10.12 (16A323)). I have tried 

logger "Hello world" and checked /var/log/system.log using Console app, the following was the log entry created


  Failed to harvest strings for binary named '–Xó^H'


How to use logger in OS X ? Is there anything to be specified to create/add an entry to OS X system log ?
Because Apple's logging system changed in macOS sierra.
They are moving from the Apple System Log facility to unified logging.

Here's a link to the developer documentation.

The following filters the new unified log for text "Message4me"

$logger -is -t LogTest "Message4Me" 
Oct 15 13:19:27  LogTest[51173] &lt;Notice&gt;: Message4Me

$log show --predicate 'eventMessage contains "Message4Me"' --last 3m

Skipping info and debug messages, pass --info and/or --debug to include.
Filtering the log data using "eventMessage CONTAINS "Message4Me""
Timestamp                       Thread     Type        Activity             PID    
2016-10-15 13:19:27.666574+0900 0x33b62c   Default     0x0                  51173  logger: Message4Me
 --------------------------------------------------------------------------------------------------------------------
Log      - Default:          1, Info:                0, Debug:             0, Error:          0, Fault:          0


=======

If you add --info you will see the event message itself in the output as well.

In the previous OS versions the logger command would send to the /var/log/system.log  file if the priority was high enough (e.g. using -p alert) as well as to the syslog database.
In Sierra the system.log is not written to when logger is used with -p alert -not in 10.12.1 anyway.  This could be a bug.

You can still use logger to send to he new logging system, but will have to use the Console app or the cli log utility or the new API to see the results.