Channel & Dunno & Misc & RSS & Scheduler: Let the logging facility perform string templating to avoid extra format chars in argument.

This commit is contained in:
Valentin Lorentz 2015-11-03 17:25:13 +01:00
parent a8748c3b73
commit 3f66dbc3d5
5 changed files with 8 additions and 8 deletions

View File

@ -70,8 +70,8 @@ class Channel(callbacks.Plugin):
channel, msg.prefix) channel, msg.prefix)
irc.sendMsg(networkGroup.channels.join(channel)) irc.sendMsg(networkGroup.channels.join(channel))
else: else:
self.log.info('Kicked from %s by %s. Not auto-rejoining.' % self.log.info('Kicked from %s by %s. Not auto-rejoining.',
(channel, msg.prefix)) channel, msg.prefix)
def _sendMsg(self, irc, msg): def _sendMsg(self, irc, msg):
irc.queueMsg(msg) irc.queueMsg(msg)

View File

@ -49,7 +49,7 @@ class Dunno(plugins.ChannelIdDatabasePlugin):
dunno = dunno.text dunno = dunno.text
prefixNick = self.registryValue('prefixNick', channel) prefixNick = self.registryValue('prefixNick', channel)
env = {'command': tokens[0]} env = {'command': tokens[0]}
self.log.info('Issuing "dunno" answer, %s is not a command.' % self.log.info('Issuing "dunno" answer, %s is not a command.',
tokens[0]) tokens[0])
dunno = ircutils.standardSubstitute(irc, msg, dunno, env=env) dunno = ircutils.standardSubstitute(irc, msg, dunno, env=env)
irc.reply(dunno, prefixNick=prefixNick) irc.reply(dunno, prefixNick=prefixNick)

View File

@ -171,9 +171,9 @@ class Misc(callbacks.Plugin):
if tokens: if tokens:
# echo [] will get us an empty token set, but there's no need # echo [] will get us an empty token set, but there's no need
# to log this in that case anyway, it being a nested command. # to log this in that case anyway, it being a nested command.
self.log.info('Not replying to %s in %s, not a command.' % self.log.info('Not replying to %s in %s, not a command.',
(tokens[0], channel tokens[0], channel
if channel != irc.nick else _('private'))) if channel != irc.nick else _('private'))
if irc.nested: if irc.nested:
bracketConfig = conf.supybot.commands.nested.brackets bracketConfig = conf.supybot.commands.nested.brackets
brackets = conf.get(bracketConfig, channel) brackets = conf.get(bracketConfig, channel)

View File

@ -324,7 +324,7 @@ class RSS(callbacks.Plugin):
for name in announced_feeds: for name in announced_feeds:
feed = self.get_feed(name) feed = self.get_feed(name)
if not feed: if not feed:
self.log.warning('Feed %s is announced but does not exist.' % self.log.warning('Feed %s is announced but does not exist.',
name) name)
continue continue
self.update_feed_if_needed(feed) self.update_feed_if_needed(feed)

View File

@ -87,7 +87,7 @@ class Scheduler(callbacks.Plugin):
except AssertionError as e: except AssertionError as e:
if str(e) == 'An event with the same name has already been scheduled.': if str(e) == 'An event with the same name has already been scheduled.':
# we must be reloading the plugin, event is still scheduled # we must be reloading the plugin, event is still scheduled
self.log.info('Event %s already exists, adding to dict.' % (name,)) self.log.info('Event %s already exists, adding to dict.', name)
self.events[name] = event self.events[name] = event
else: else:
raise raise