Adds thread-safe (I hope) logging mechanism