-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added delegate to the logger + improvements
- Loading branch information
Showing
5 changed files
with
110 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
# Logging | ||
|
||
For logging purposes, WMT uses `WMTLogger` class that prints to the console. | ||
|
||
<!-- begin box info --> | ||
Note that logging to the console is available only when the library is compiled in the `Debug` mode or with `WMT_ENABLE_LOGGING` Swift compile condition. | ||
<!-- end --> | ||
You can set up logging for the library using the `WMTLogger` class. | ||
|
||
### Verbosity Level | ||
|
||
You can limit the amount of logged information via `verboseLevel` property. | ||
|
||
| Level | Description | | ||
| --- | --- | | ||
| `off` | Silences all messages. | | ||
| `errors` | Only errors will be printed to the debug console. | | ||
| `warnings` _(default)_ | Errors and warnings will be printed to the debug console. | | ||
| `all` | All messages will be printed to the debug console. | | ||
You can limit the amount of logged information via the `verboseLevel` property. | ||
|
||
Example configuration: | ||
| Level | Description | | ||
| ---------------------- | ------------------------------------------------- | | ||
| `off` | Silences all messages. | | ||
| `errors` | Only errors will be logged. | | ||
| `warnings` _(default)_ | Errors and warnings will be logged. | | ||
| `info` | Error, warning and info messages will be logged. | | ||
| `all` | All messages will be logged. | | ||
|
||
```swift | ||
import WultraMobileTokenSDK | ||
### Logger Delegate | ||
|
||
WMTLogger.verboseLevel = .all | ||
``` | ||
In case you want to process logs on your own (for example log into a file or some cloud service), you can set `WMTLogger.delegate`. |