Provides a lightweight logging implementation for Swift!
[STEP 1] Add dependencies
Add this repository's link to Package Dependencies
https://github.com/JYPjoy/Log
[STEP 2] Import packages
import Log
[STEP 3] Basic Usages
Log.t("This is a Trace message.")
Log.d("This is a Debug message.")
Log.i("This is a Informational message.")
Log.n("This is a Notice message.")
Log.w("This is a Warning.")
Log.e("This is a Error.")
Log.c("This is a Critical error.")
Logging Levels
- You can specify the level of output on initialization. You will see output of that level, and all levels below that.
Ordered from Least to most Severe.
The order is:
t(TRACE)
: Appropriate for messages that contain information normally of use only when tracing the execution of a program.d(DEBUG)
: Appropriate for messages that contain information normally of use only when debugging a program.i(INFO)
: Appropriate for informational messages.n(NOTICE)
: Appropriate for conditions that are not error conditions, but that may require special handling.w(WARNING)
: Appropriate for messages that are not error conditions, but more severe than .noticee(ERROR)
: Appropriate for error conditions.c(CRITICAL)
: Appropriate for critical error conditions that usually require immediate attention.
This library is licensed under MIT license. Full license text is available in LICENSE.