import{_ as n,o as s,c as a,e as t}from"./app-BiKNfxRB.js";const e={},o=t(`

func get_format() -> str

源代码
def get_format(level: str) -> str:
    if level == 'DEBUG':
        return debug_format
    else:
        return default_format

func init_log()

说明: 在语言加载完成后执行

源代码
def init_log(config: dict):
    """
    在语言加载完成后执行
    Returns:

    """
    logger.remove()
    logger.add(sys.stdout, level=0, diagnose=False, format=get_format(config.get('log_level', 'INFO')))
    show_icon = config.get('log_icon', True)
    logger.level('DEBUG', color='<blue>', icon=f"{('🐛' if show_icon else '')}DEBUG")
    logger.level('INFO', color='<normal>', icon=f"{('ℹ️' if show_icon else '')}INFO")
    logger.level('SUCCESS', color='<green>', icon=f"{('✅' if show_icon else '')}SUCCESS")
    logger.level('WARNING', color='<yellow>', icon=f"{('⚠️' if show_icon else '')}WARNING")
    logger.level('ERROR', color='<red>', icon=f"{('⭕' if show_icon else '')}ERROR")
`,5),p=[o];function c(l,i){return s(),a("div",null,p)}const r=n(e,[["render",c],["__file","log.html.vue"]]),k=JSON.parse('{"path":"/dev/api/log.html","title":"liteyuki.log","lang":"zh-CN","frontmatter":{"title":"liteyuki.log","description":"func get_format() -> str 源代码 func init_log() 说明: 在语言加载完成后执行 源代码","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/log.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/log.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.log"}],["meta",{"property":"og:description","content":"func get_format() -> str 源代码 func init_log() 说明: 在语言加载完成后执行 源代码"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.log\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"func get_format() -> str","slug":"func-get-format-str","link":"#func-get-format-str","children":[]},{"level":3,"title":"func init_log()","slug":"func-init-log","link":"#func-init-log","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":5}]},"readingTime":{"minutes":0.44,"words":133},"filePathRelative":"dev/api/log.md","localizedDate":"2024年8月19日","autoDesc":true}');export{r as comp,k as data};