def log(self, msg: Message):
d = msg._asdict()
d['asctime'] = datetime.fromtimestamp(msg.time, self.tz).strftime('%Y-%m-%d %H:%M:%S')
d['srcname'] = msg.src.alias
d['srcid'] = msg.src.id
self.loghandler.emit(logging.makeLogRecord({'msg': self.FORMAT % d}))
评论列表
文章目录