2016-06-29 34 views

回答

1

其回購的Advanced Usage部分指定參數showDate,該參數可以設置爲false

// Create a logger object with no destinations 
let log = XCGLogger(identifier: "advancedLogger", includeDefaultDestinations: false) 

// Create a destination for the system console log (via NSLog) 
let systemLogDestination = XCGNSLogDestination(owner: log, identifier: "advancedLogger.systemLogDestination") 

// Optionally set some configuration options 
systemLogDestination.outputLogLevel = .Debug 
systemLogDestination.showLogIdentifier = false 
systemLogDestination.showFunctionName = true 
systemLogDestination.showThreadName = true 
systemLogDestination.showLogLevel = true 
systemLogDestination.showFileName = true 
systemLogDestination.showLineNumber = true 
systemLogDestination.showDate = false 

// Add the destination to the logger 
log.addLogDestination(systemLogDestination) 
相關問題