Slide 1

Slide 1 text

Logging in Production @parrots

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

CocoaLumberjack pod 'CocoaLumberjack/Swift'

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Why Log?

Slide 6

Slide 6 text

RECaf https://recaf.app

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

What Does It Look Like? Traditionally

Slide 10

Slide 10 text

NSLog(“Something went wrong!”)

Slide 11

Slide 11 text

NSLog(“There were \(entryCount) entries.”)

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

What Does It Look Like? Suggested Way

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

OK, Sounds Cool. How Do?

Slide 17

Slide 17 text

CocoaLumberjack pod 'CocoaLumberjack/Swift'

Slide 18

Slide 18 text

Levels Loggers

Slide 19

Slide 19 text

Levels Loggers • Error • Warning • Info • Debug • Verbose

Slide 20

Slide 20 text

Levels Loggers • Error • Warning • Info • Debug • Verbose • Console • System • Rolling Files

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

@parrots Thanks! github/parrots/CocoaLumberjackDemo