Cleanup logging, also log outgoing messages.