diff --git a/github.py b/github.py index 599c995e1b..3c647afe44 100644 --- a/github.py +++ b/github.py @@ -59,7 +59,7 @@ def issue(bot, trigger): data = json.loads(raw) bot.say('Issue #%s posted. %s' % (data['number'], data['html_url'])) - bot.debug('GitHub', 'Issue #%s created in %s' % (data['number'], trigger.sender), 'warning') + bot.debug(__file__, 'Issue #%s created in %s' % (data['number'], trigger.sender), 'warning') @commands('addtrace', 'addtraceback') @@ -118,7 +118,7 @@ def add_traceback(bot, trigger): data = json.loads(raw) bot.say('Added traceback to issue #%s. %s' % (number, data['html_url'])) - bot.debug('GitHub', 'Traceback added to #%s in %s.' % (number, trigger.sender), 'warning') + bot.debug(__file__, 'Traceback added to #%s in %s.' % (number, trigger.sender), 'warning') @commands('findissue', 'findbug') diff --git a/ip.py b/ip.py index 76d976d129..086d32698a 100644 --- a/ip.py +++ b/ip.py @@ -54,7 +54,7 @@ def _find_geoip_db(bot): os.path.isfile(os.path.join(config.ip.GeoIP_db_path, 'GeoIPASNum.dat'))): return config.ip.GeoIP_db_path else: - bot.debug('ip', 'GeoIP path configured but DB not found in configured path', 'warning') + bot.debug(__file__, 'GeoIP path configured but DB not found in configured path', 'warning') if (os.path.isfile(os.path.join(bot.config.homedir, 'GeoLiteCity.dat')) and os.path.isfile(os.path.join(bot.config.homedir, 'GeoIPASNum.dat'))): return bot.config.homedir @@ -62,7 +62,7 @@ def _find_geoip_db(bot): os.path.isfile(os.path.join('/usr/share/GeoIP', 'GeoIPASNum.dat'))): return '/usr/share/GeoIP' elif can_download: - bot.debug('ip', 'Downloading GeoIP database', 'always') + bot.debug(__file__, 'Downloading GeoIP database', 'always') bot.say('Downloading GeoIP database, please wait...') geolite_city_url = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz' geolite_ASN_url = 'http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz' @@ -86,7 +86,7 @@ def ip(bot, trigger): query = trigger.group(2) db_path = _find_geoip_db(bot) if db_path is False: - bot.debug('ip', 'Can\'t find (or download) usable GeoIP database', 'always') + bot.debug(__file__, 'Can\'t find (or download) usable GeoIP database', 'always') bot.say('Sorry, I don\'t have a GeoIP database to use for this lookup') return False geolite_city_filepath = os.path.join(_find_geoip_db(bot), 'GeoLiteCity.dat') diff --git a/movie.py b/movie.py index 49898175d2..76f03a56fd 100644 --- a/movie.py +++ b/movie.py @@ -29,8 +29,8 @@ def movie(bot, trigger): if 'Error' in data: message = '[MOVIE] %s' % data['Error'] else: - bot.debug('movie', 'Got an error from the imdb api, search phrase was %s' % word, 'warning') - bot.debug('movie', str(data), 'warning') + bot.debug(__file__, 'Got an error from the imdb api, search phrase was %s' % word, 'warning') + bot.debug(__file__, str(data), 'warning') message = '[MOVIE] Got an error from imdbapi' else: message = '[MOVIE] Title: ' + data['Title'] + \ diff --git a/radio.py b/radio.py index 195bf6222c..80ea3cf9a9 100644 --- a/radio.py +++ b/radio.py @@ -63,7 +63,7 @@ def currentSong(bot, trigger): song = web.get(radioURL % 'currentsong') except Exception as e: bot.say('The radio is not responding to the song request.') - bot.debug('radio', 'Exception while trying to get current song: %s' % e, 'warning') + bot.debug(__file__, 'Exception while trying to get current song: %s' % e, 'warning') if song: bot.say('Now playing: ' + song) else: @@ -76,7 +76,7 @@ def nextSong(bot, trigger): song = web.get(radioURL % 'nextsong') except Exception as e: bot.say('The radio is not responding to the song request.') - bot.debug('radio', 'Exception while trying to get next song: %s' % e, 'warning') + bot.debug(__file__, 'Exception while trying to get next song: %s' % e, 'warning') if song: bot.say('Next up: ' + song) else: @@ -115,7 +115,7 @@ def radio(bot, trigger): except Exception as e: checkSongs -= 1 if checkSongs == 0: - bot.debug('radio', 'Exception while trying to get periodic radio data: %s' % e, 'warning') + bot.debug(__file__, 'Exception while trying to get periodic radio data: %s' % e, 'warning') bot.say('The radio is not responding to the song request.') bot.say('Turning off radio data checking.') break