logger: misc code clean-up

Signed-off-by: zwliew <zhaoweiliew@gmail.com>