refactoring: local renaming
refactoring: level detection code moved into LogMessage