type safe logger