Add logging support

* Code-selectable logging to either stdout or syslog
* Coloured log levels when on stdout
* Convenience macros to reduce typing for common checks
Merge pull request #5 from rmrobinson/addLogging

Add logging support