Fixed a bug where I called logger.basicConfig() twice - only one call allowed.
Made the on_publish event handler a lambda function too.