A lightweight and easy to use logging module.
To run the example project, clone this repo, and open MGELogger.xcworkspace from the iOS Example directory.
Add the import
statement
import MGELogger
Create a Logger
instance. You may create a global variable for convenient access all around the project.
let logger = Logger()
Then you can log your message with any level you need:
...
logger.debug(title: "Network Response", message: body.prettyPrinted)
...
Output:
[21-08-14 06:50:38601] 🐞 DEBUG: NetworkProvider.swift:71: decodeBody():
Network Response:
{
"address": {
"city": "Naples",
"coordinates": {
"latitude": 40.0,
"longitude": 45.0
},
"country": "IT",
"province": "NA",
"street": "Via Toledo, 15"
}
}
Requires iOS 9.0 or above.
Add this to your project using Swift Package Manager. In Xcode that is simply: 'File > Swift Packages > Add Package Dependency...' paste this repo link and you're all set 👌🏾.
Feel free to give your contribution or open a new issue! 😄
Martin Essuman (@martin-e91)
MGELogger is available under the MIT license. See the LICENSE file for more information.
link |
Stars: 1 |
Last commit: 2 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics