engine.py 文件源码

python
阅读 49 收藏 0 点赞 0 评论 0

项目:tk-photoshopcc 作者: shotgunsoftware 项目源码 文件源码
def _handle_logging(self, level, message):
        """
        Handles an RPC logging request.

        :param str level: One of "debug", "info", "warning", or "error".
        :param str message: The log message.
        """

        # manually create a record to log to the standard file handler.
        # we format it to match the regular logs, but tack on the '.js' to
        # indicate that it came from javascript.
        record = logging.makeLogRecord({
            "levelname": level.upper(),
            "name": "%s.js" % (self.logger.name,),
            "msg": message,
        })

        # forward this message to the base file handler so that it is logged
        # appropriately.
        if sgtk.LogManager().base_file_handler:
            sgtk.LogManager().base_file_handler.handle(record)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号