To run the example project, clone the repo, and run pod install
from the Example directory first.
DJLogger is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'DJLogger'
import DJLogger
class ViewController: UIViewController {
let logger = DJLLogger("My Log", [DJLConsoleHandler(), DJLFileHandler("logfile")])
override func viewDidLoad() {
super.viewDidLoad()
logger.trace("View Did Load")
}
func requestData() {
logger.debug("Start Requesting Data")
// ...
logger.debug("Data Request Completed")
// or
logger.error("Data Request Failed")
}
}
David Jonsén
DJLogger is available under the MIT license. See the LICENSE file for more info.