453jerry/FlightLog
This swift package used to record NSLog()/print() information 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 logLog enumeration also supports ignoring logs by log level.
Log.setIngore(levels: [.debug])Package Metadata
Repository: 453jerry/FlightLog
Stars: 1
Forks: 1
Open issues: 0
Default branch: main
Primary language: swift
License: MIT
Topics: ios, log, logger, nslog, print, recorder
README: README.md