-
Notifications
You must be signed in to change notification settings - Fork 2
Quick start
Rakuyo edited this page Nov 3, 2020
·
4 revisions
The following content will tell you how to use the library, but basically does not involve "why do this" and "what does this type mean".
See other wikis for more details. For complete code examples, please refer to the demo provided with the repository (under the ʻExamples` directory).
RaLog
provides Log
type, which can be used to print logs:
Log.debug("This is a log.")
After running the above code in the Debug environment, the following will be output in the console:
(
RaLog
does not print logs by default in Release environment)
[↓ In `viewDidLoad()` of ViewController.swift:32 ↓]
[RaLog] 11:17:01:353 <👾 Debug> : This is a log.
In addition to the debug
flag used above, RaLog
also provides other 6 log flags. The complete list of flags is as follows:
Name | Output | Call Method | Parameter |
---|---|---|---|
debug | 👾 Debug | Log.debug(...) |
Any? |
warning | Log.warning(...) |
Any? |
|
success | ✅ Success | Log.success(...) |
Any? |
error | ❌ Error | Log.error(...) |
Any? |
deinit | Log.deinit(...) |
AnyObject? |
|
jump | 👋 Jump |
Log.appear(...) , Log.disappear(...)
|
UIViewController 泛型 |
javascript | 🔥 Javascript | Log.javascript(...) |
Any? |