42
GitHub - sauvikdolui/swiftlogger: Medium Blog Post Project Repository
source link: https://github.com/sauvikdolui/swiftlogger
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
swiftlogger
Medium Blog Post Project Repository
Installtion
- Download or clone the repository.
- Indentify the
Logger.swift
from../SwiftLogger/Debug
and drag and drop the file to your project directory.
Usages
// String Message Logging Log.d("This is a DEBUG message") // DEBUG log Log.e("This is an ERROR message") // ERROR log Log.i("This is a INFO message") // INFO log Log.v("This is a VERBOSE message") // VERBOSE log Log.w("This is a WARNING message") // WARNING log Log.s("This is a SEVERE message") // SEVERE Error log struct Student { let name: String let rollNum: Int } extension Student: CustomDebugStringConvertible { var debugDescription: String { return "Student[name: \(name), roll: \(rollNum)]" } } // Logging values Log.d(Student(name: "Socket", rollNum: 19)) // Prints Student[name: Socket, roll: 19]
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK