fix logger performance issue