Trimming log messages