-
Notifications
You must be signed in to change notification settings - Fork 3
1. Installation
Damon东哥 edited this page Mar 20, 2025
·
1 revision
You can install DDLoggerSwift using CocoaPods or manually by downloading the source files and adding them to your project.
Add the following line to your Podfile
and run pod install
:
pod 'DDLoggerSwift'
Drag and drop the files from the pod
folder into your project.
import DDLoggerSwift
DDLoggerSwift.show()
There are five types of log outputs, each with different font colors.
printDebug(log) // Debug output, only visible in Xcode, not stored in the log database.
printLog(log) // Logs displayed in green.
printWarn(log) // Logs displayed in yellow.
printError(log) // Logs displayed in red.
printPrivacy(log) // Outputs encrypted data. Encryption details can be found in the encryption documentation.
✅ [2025-03-19T03:11:59Z] [INFO] File: TalkViewModel.swift | Line: 730 | Function: _bindRequest() |
---------------------------------
Log message
⚠️ [2025-03-19T03:11:59Z] [WARN] File: TalkViewModel.swift | Line: 730 | Function: _bindRequest() |
---------------------------------
Warning message
❌ [2025-03-19T03:11:59Z] [ERROR] File: TalkViewModel.swift | Line: 730 | Function: _bindRequest() |
---------------------------------
Error message
⛔️ [2025-03-19T03:11:59Z] [PRIVACY] File: TalkViewModel.swift | Line: 730 | Function: _bindRequest() |
---------------------------------
AAuKjIm5hC2jiPqz7OKHAngWspeACyWZufDguqdOcugituhWV8jnbr/6SHYoK0/9
💜 [2025-03-19T03:11:59Z] [DEBUG] File: TalkViewModel.swift | Line: 730 | Function: _bindRequest() |
---------------------------------
Test output, not stored in the database by default.