Use logging.debug() instead of logmsg().