Featured iPhone Development Resources iOS Development Libraries Open Source iOS Libraries And Tools Swift

An Open Source Swift Library For Easily Creating Much More Useful Logging Statements

Previously I mentioned a Swift library inspired by Underscore.js, and a Swift library for working with the Twitter API.

Here’s a debug logging framework for Swift projects with a number of nice features called XCGLogger from Dave Wood.

Some of the features of XCGLogger include:

Much more detailed log messages including line numbers, function names, timestamps
Different log levels (severe, error, debug, info, verbose)
Saving of the log to a file

This example from the Cerebral Gardens blog shows the detail added with XCLogger going from default logging output like this:

Simple message

to this:

2014-06-09 06:44:43.600 [Debug] [AppDelegate.swift:40] application(_:didFinishLaunchingWithOptions:): Simple message

You can find XCGLogger on Github here.

You can also read more about XCGLogger on the Cerebral Gardens blog.

A great library for easily creating more detailed logging statements.