(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{547:function(t,e,r){"use strict";r.r(e);var o=r(21),s=Object(o.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"nonebot-log-模块"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#nonebot-log-模块"}},[t._v("#")]),t._v(" NoneBot.log 模块")]),t._v(" "),r("h2",{attrs:{id:"日志"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#日志"}},[t._v("#")]),t._v(" 日志")]),t._v(" "),r("p",[t._v("NoneBot 使用 "),r("a",{attrs:{href:"https://github.com/Delgan/loguru",target:"_blank",rel:"noopener noreferrer"}},[t._v("loguru"),r("OutboundLink")],1),t._v(" 来记录日志信息。")]),t._v(" "),r("p",[t._v("自定义 logger 请参考 "),r("a",{attrs:{href:"https://github.com/Delgan/loguru",target:"_blank",rel:"noopener noreferrer"}},[t._v("loguru"),r("OutboundLink")],1),t._v(" 文档。")]),t._v(" "),r("h2",{attrs:{id:"logger"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#logger"}},[t._v("#")]),t._v(" "),r("code",[t._v("logger")])]),t._v(" "),r("ul",[r("li",[r("p",[r("strong",[t._v("说明")])]),t._v(" "),r("p",[t._v("NoneBot 日志记录器对象。")])]),t._v(" "),r("li",[r("p",[r("strong",[t._v("默认信息")])]),t._v(" "),r("ul",[r("li",[r("p",[t._v("格式: "),r("code",[t._v("[%(asctime)s %(name)s] %(levelname)s: %(message)s")])])]),t._v(" "),r("li",[r("p",[t._v("等级: "),r("code",[t._v("DEBUG")]),t._v(" / "),r("code",[t._v("INFO")]),t._v(" ，根据 config 配置改变")])]),t._v(" "),r("li",[r("p",[t._v("输出: 输出至 stdout")])])])]),t._v(" "),r("li",[r("p",[r("strong",[t._v("用法")])])])]),t._v(" "),r("div",{staticClass:"language-python line-numbers-mode"},[r("pre",{pre:!0,attrs:{class:"language-python"}},[r("code",[r("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" nonebot"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("log "),r("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" logger\n")])]),t._v(" "),r("div",{staticClass:"line-numbers-wrapper"},[r("span",{staticClass:"line-number"},[t._v("1")]),r("br")])])])}),[],!1,null,null,null);e.default=s.exports}}]);