XCGLogger是一个debug日志框架,用于Swift项目中。允许您记录详细信息到控制台(还有一个可选的文件)。就像你用NSLog或println,但还有其他额处信息,如日期,函数名,文件名和行号。
import XCGLogger let log = XCGLogger.defaultInstance() log.verbose("A verbose message, usually useful when working on a specific problem") log.debug("A debug message") log.info("An info message, probably useful to power users looking in console.app") log.error("An error occurred, but it's recoverable, just info about what happened") log.severe("A severe error occurred, we are likely about to crash now")
项目主页:http://www.open-open.com/lib/view/home/1409123944885