Get Updates By E-mail 

Article Written By:
Johann Dowa

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.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments