created simple switchable logger for console and syslog

there will be a version of this that accumulates messages without printing
or making any syscalls later.