Refactored LogListener.

There was an error capturing exeptions.
Also setting the user context should not be mandatory
when capturing messages or exceptions.