Skip to content

Commit 5aca589

Browse files
authored
Update README.md regarding OSLog introduction. (#34)
1 parent 571df9a commit 5aca589

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,17 @@ let username = KeychainStorage.shared.string(forKey: Constants.Username)
330330

331331
#### Logging ####
332332

333-
There's a LogProtocol, which enables you to log at different levels, such as:
334-
- verbose
335-
- debug
336-
- info
337-
- warning
338-
- error
339-
- fatal
340-
341-
An implementation is provided with another open sourced logger, SwiftyBeaver (https://github.com/SwiftyBeaver/SwiftyBeaver). You can control the log level for different environments by setting the logLevel value in the Configuration.plist file.
333+
Logging supports multiple levels, controlled via the "logLevel" key in your Configuration.plist. This value sets the minimum level of logs to be shown — logs below this threshold are ignored.
334+
335+
Log levels:
336+
debug = 0
337+
info = 1
338+
error = 2
339+
fault = 3
340+
341+
For example, if you set "logLevel": 2 (i.e., error) in Configuration.plist, only Log.error(...) and Log.fault(...) will be logged — Log.debug(...) and Log.info(...) will be ignored.
342+
343+
You can manage log levels across different environments by using environment-specific Configuration.plist files.
342344

343345
#### Translation ####
344346

0 commit comments

Comments
 (0)