Series: Swift logging tutorial: The importance of logging

The importance of logging, a Swift logging tutorial

Do you log in each and every application you write? I hope you said yes. Assuming you didn't, I want to teach you how easy it is to add logging to all of your applications. I will teach you why it is so important. In the Swift logging tutorial, I'll teach you that, and more!

Logging is the dialog your application carries on with you as the developer while it is running. It can be used during development to help debug problems. It can be used even when your application is live and running on the devices of all of the people whom have downloaded your app from the App Store.

Syllabus

In this series, I will teach you all about logging, including:

  • The need for logging in all apps
  • Log everything!
  • Log message severities
  • Log targets/destinations
  • Log filters
  • Structured logging
  • An introduction to the Swifty Beaver logging framework
  • Configuring Swifty Beaver for your own applications
  • Common Swifty Beaver destination configuration options
  • Configuring Swifty Beaver to log to the console
  • Configuring Swifty Beaver to log to a file
  • Configuring Swifty Beaver to log to the cloud platform
  • Swifty Beaver's use of @autoclosure
  • The Swifty Beaver OS X app
  • Swifty Beaver logging in a real app

I hope to convince you to begin logging in your applications if you aren't already doing so. Logging is extremely simple to add. It provides significant value to you as a developer. After watching this series, you'll wonder how you've ever gotten along without it. I am of the belief that logging is a core requirement of every single application no matter how big or small. The Swift logging tutorial will also teach you about one of the available Swift logging libraries; Swifty Beaver.

Logging photo is released under the CC BY-NC-SA 2.0 license. Original photo by Mark Kent.