Add log categories and handlers.

Add log categories and handlers. Only Syslog completely working so far.