use custom logger instead of logging

Previous pull raised a warning, this one fixed it.