Use an event handler to dispatch log events

Use an event handler to receive and dispatch log events to
any handler that are registered. This allows for more multiple
handlers to be used simultaneously and allows them to be dynamically
added and removed from the application.