Do not delete messages if $delete = false.
Merge pull request #1080 from cmfcmf/logutil-fix

Do not delete messages if $delete = false.