Replace logging functions with calls to logging module