fix syslog message_handler

update code for changes in portal syslog message_handler, and a little cleanup.  updated tests included.