diff --git a/statusbot/bot.py b/statusbot/bot.py index 7f259d0..56731b5 100755 --- a/statusbot/bot.py +++ b/statusbot/bot.py @@ -244,7 +244,7 @@ class UpdateInterface(object): class Tweet(UpdateInterface): - log = logging.getLogger("statusbot.tweet") + logger = logging.getLogger("statusbot.tweet") def __init__(self, config): self.consumer_key = config.get('twitter', 'consumer_key') @@ -278,7 +278,7 @@ class Tweet(UpdateInterface): in_reply_to_status_id = prior_tweet.id, auto_populate_reply_metadata=True) except tweepy.TweepyException as e: - self.log.exception("Failed to tweet") + self.logger.exception("Failed to tweet") def alert(self, msg=None): # warning sign @@ -300,7 +300,7 @@ class Tweet(UpdateInterface): class Toot(UpdateInterface): - log = logging.getLogger("statusbot.toot") + logger = logging.getLogger("statusbot.toot") def __init__(self, config): self.host = config.get('mastodon', 'host') @@ -318,9 +318,9 @@ class Toot(UpdateInterface): # not sure what to check for... if r.status_code == 200: json_data = r.json() - self.log('Tooted id: %s' % json_data['id']) + self.logger.debug('Tooted id: %s' % json_data['id']) else: - self.log('Toot failed: %s' % r.status_code) + self.logger.error('Toot failed: %s' % r.status_code) def alert(self, msg=None): # warning sign