make logger more flexible