目录
目录README.md

FlightLog

swift platform
This package implements a recorder to record runtime log to file.

How to use

Only need to invoke LogRecorder.shared.record(), Recorder will automatically log all stdout and stderr to a file. No need to modify NSLog(_:) or print(_:) in your code.

_ = LogRecorder.shared.record()

If you want the logs to have different levels, you can use the log enum.

Log.debug.write("This is a debug log")          // 🔍 This is a debug log
Log.info.write("This is a info log")            // 💬 This is a info log
Log.warning.write("This is a warning log")      // ⚠️ This is a warning log
Log.error.write("This is a error log")          // ❌ This is a error log

Log enumeration also supports ignoring logs by log level.

Log.setIngore(levels: [.debug])
关于
44.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号