finally got logging working