Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Logging in Production

Logging in Production

Debugging issues with your app once it hits the App Store can be … fun … sometimes. That dreaded “it doesn’t work” email from a customer, in which they provide no useful information and there’s no crash log to help you. Curtis is going to walk through a logging framework, CocoaLumberjack, and a few techniques he’s come up with, to make his life debugging customer issues much less painful.

Demo code: https://github.com/parrots/CocoaLumberjackDemo

Curtis Herbert

October 11, 2018
Tweet

More Decks by Curtis Herbert

Other Decks in Programming

Transcript

  1. zipzap, Mapbox-iOS-SDK, MapboxMobileEvents, GoogleMaps, VTAcknowledgementsViewController, KissXML, MHWDirectoryWatcher, FBSDKCoreKit, JLRoutes, Crashlytics,

    FXKeychain, ReachabilitySwift, 1PasswordExtension, Firebase/Core, Firebase/Analytics, Firebase/ RemoteConfig, GzipSwift, JWT, SHEmailValidator, SDWebImage, Mobile-Buy-SDK, AFNetworking, ClusterKit, ActionSheetPicker, SwiftLint, GPSKit, CSV.swift, CHCSVParser, SwiftyJSON, CocoaLumberjack/Swift, MMWormhole
  2. Take a look at these logs for me, when you

    get a chance. Joe Cieplinski 09:50 2018/09/19 10:13:56:392 Received invalid product identifier: com.joecieplinski.RECaf.12months
  3. iOS Version: 12.0 App Version: 1.1.0 Is Subscribed: true Free

    Trial Expired: true Expiration Date: 2018-10-03 17:06:13 +0000 HealthKit Permission Granted: true DebugInfo.txt
  4. 2018/10/11 10:31:00:014 Non-OK response from server: 401 2018/10/11 10:31:00:014 Error

    fetching metadata 401: ("{\n \"message\" : \"Authorization error\",\n \"success\" : false\n}") 2018/10/11 10:32:19:259 Non-OK response from server: 401 2018/10/11 10:32:19:259 Error fetching metadata 401: (“{\n \"message\" : \"Authorization error\",\n \"success\" : false\n}") DebugLogs.txt
  5. Levels Loggers • Error • Warning • Info • Debug

    • Verbose • Console • System • Rolling Files
  6. Demo Agenda • Configuring log output destinations (loggers) • Configuring

    log level for debug vs release • Attaching logs to Crashlytics • Retrieving logs for customer support • Adding additional info for customer support