fix the bug in logger2 class