Last active
August 29, 2015 14:21
-
-
Save choefele/3bbdc9b7146f69b0cb70 to your computer and use it in GitHub Desktop.
NSLogger – startNSLogger()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class func startNSLogger() { | |
let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true); | |
let file = "\(paths.first!)/loggerdata" | |
let bundleName = NSBundle.mainBundle().objectForInfoDictionaryKey(kCFBundleNameKey as String) as! String | |
let logger = LoggerInit() | |
LoggerSetBufferFile(logger, file) | |
LoggerSetOptions(logger, UInt32(kLoggerOption_BufferLogsUntilConnection | kLoggerOption_BrowseBonjour | kLoggerOption_BrowseOnlyLocalDomain)) | |
LoggerSetupBonjour(logger, nil, bundleName) | |
LoggerStart(nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment