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

liteyuki.log

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/27 上午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : log.py @Software: PyCharm

def get_format(level: str) -> str

Source code or View on GitHub
def get_format(level: str) -> str:
    if level == 'DEBUG':
        return debug_format
    else:
        return default_format

def init_log(config: dict)

Description: 在语言加载完成后执行

Source code or View on GitHub
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")
`,8),p=[o];function i(l,c){return s(),a("div",null,p)}const u=n(e,[["render",i],["__file","log.html.vue"]]),k=JSON.parse('{"path":"/en/dev/api/log.html","title":"liteyuki.log","lang":"en-US","frontmatter":{"title":"liteyuki.log","lastUpdated":false,"description":"liteyuki.log Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved @Time : 2024/7/27 上午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : log.py ...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/log.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/log.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.log"}],["meta",{"property":"og:description","content":"liteyuki.log Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved @Time : 2024/7/27 上午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : log.py ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["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":"def get_format(level: str) -> str","slug":"def-get-format-level-str-str","link":"#def-get-format-level-str-str","children":[]},{"level":3,"title":"def init_log(config: dict)","slug":"def-init-log-config-dict","link":"#def-init-log-config-dict","children":[]}],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.61,"words":184},"filePathRelative":"en/dev/api/log.md","localizedDate":"August 21, 2024","autoDesc":true}');export{u as comp,k as data};