Another fix for MONDRIAN-1385. Makes the monitor not prone to out of memory exceptions and also outputs stack traces of the events when the logger is in TRACE mode.