renamed: FFAI/__pycache__/catch.cpython-313.pyc -> FFAICilent/__pycache__/catch.cpython-313.pyc renamed: FFAI/__pycache__/crawlers.cpython-313.pyc -> FFAICilent/__pycache__/crawlers.cpython-313.pyc renamed: FFAI/__pycache__/crawlers_core.cpython-313.pyc -> FFAICilent/__pycache__/crawlers_core.cpython-313.pyc renamed: FFAI/analyzer.py -> FFAICilent/analyzer.py renamed: FFAI/catch.py -> FFAICilent/catch.py new file: FFAICilent/cloud.py new file: FFAICilent/config/config.ini new file: FFAICilent/config/configloder.py renamed: FFAI/crawlers.py -> FFAICilent/crawlers.py renamed: FFAI/crawlers_core.py -> FFAICilent/crawlers_core.py new file: FFAICilent/local.py new file: FFAICilent/logger.py renamed: FFAI/main.py -> FFAICilent/main.py new file: FFAICilent/manger.py
27 lines
641 B
Python
27 lines
641 B
Python
from logger import log
|
|
|
|
def main():
|
|
log.info("程序启动")
|
|
try:
|
|
# 你的代码
|
|
log.debug("调试信息: %s", some_var) # type: ignore
|
|
except Exception as e:
|
|
log.error("操作失败: %s", str(e), exc_info=True)
|
|
raise
|
|
# 自定义日志器
|
|
custom_log = setup_logging(
|
|
name="MyModule",
|
|
log_dir="custom_logs",
|
|
file_level=logging.INFO,
|
|
console_level=logging.DEBUG,
|
|
max_bytes=5*1024*1024, # 5MB
|
|
backup_count=3
|
|
)
|
|
|
|
# 使用示例
|
|
custom_log.warning("自定义日志记录")
|
|
# 使用示例
|
|
custom_log.warning("自定义日志记录")
|
|
|
|
if __name__ == "__main__":
|
|
main() |