Logger - Unified logging system from Apple

Опубликовано: 22 Март 2026
на канале: AF Swift Tutorials
1,307
15

In this video you will find out how to use logging in iOS app. I'll show you on a practical example how to setup and use build-in solution for logging designed by Apple and available in Xcode. We will cover losing levels, formatting and exporting of logs. Bonus tip: how to stream logs to Console app on Mac.

Create a Logger structure and use it to log messages about your app’s behavior. When logging a message, you specify the message and any program variables or custom data to help you assess the state of your app. You also choose a log level to indicate the severity of that message. The system records log messages in memory and, in some cases, also writes those messages to an on-disk data store. The log level determines which messages stay in memory and which go to disk.

MORE VIDEOS
iOS Tutorials ► https://cutt.ly/RvqPLEj
Data Structures ► https://cutt.ly/PLOhX8V
Design Patterns ► https://cutt.ly/2LOjwrY

LINKS & ATTRIBUTIONS
Source Code ► https://github.com/Andrew11US/AF-Swif...

TIMECODES
00:00 - Intro
00:30 - Why we need logging?
01:59 - Legger setup
02:47 - Log export file
03:23 - Log levels
05:43 - Log formatting
07:01 - Logger app
07:48 - Log exporting
08:40 - Get logs from device
09:23 - Console app log streaming
11:29 - Outro

#AFSwiftTutorials #logging #swift