Remove unnecessary named function in log handler