def METHOD_NAME(self, reason):
    irc.IRCClient.METHOD_NAME(self, reason)
    self.logger.log(
        "[disconnected at %s]" % time.asctime(time.localtime(time.time()))
    )
    self.logger.close()