mirror of
https://github.com/apple/swift-log
synced 2026-11-25 03:57:48 +00:00
Fix doc typo (#134)
* Fix typo in "MetadataValue" words in docs * Fix typo in "bootstrap" words in docs Co-authored-by: Shiva Huang <shiva.huang@ailabs.tw>
This commit is contained in:
1 parent
a9784b00a6
commit
6d233ae476
1 file changed
+2
-2
@@ -258,7 +258,7 @@ public enum LoggingSystem {
|
||||
|
||||
/// `bootstrap` is a one-time configuration function which globally selects the desired logging backend
|
||||
/// implementation. `bootstrap` can be called at maximum once in any given program, calling it more than once will
|
||||
/// lead to undefined behaviour, most likely a crash.
|
||||
/// lead to undefined behavior, most likely a crash.
|
||||
///
|
||||
/// - parameters:
|
||||
/// - factory: A closure that given a `Logger` identifier, produces an instance of the `LogHandler`.
|
||||
@@ -291,7 +291,7 @@ extension Logger {
|
||||
/// Examples:
|
||||
/// - prefer `logger.info("user logged in", metadata: ["user-id": "\(user.id)"])` over
|
||||
/// `..., metadata: ["user-id": .string(user.id.description)])`
|
||||
/// - prefer `logger.info("user selected colours", metadata: ["colors": ["\(user.topColor)", "\(user.secondColor)"]])`
|
||||
/// - prefer `logger.info("user selected colors", metadata: ["colors": ["\(user.topColor)", "\(user.secondColor)"]])`
|
||||
/// over `..., metadata: ["colors": .array([.string("\(user.topColor)"), .string("\(user.secondColor)")])`
|
||||
/// - prefer `logger.info("nested info", metadata: ["nested": ["fave-numbers": ["\(1)", "\(2)", "\(3)"], "foo": "bar"]])`
|
||||
/// over `..., metadata: ["nested": .dictionary(["fave-numbers": ...])])`
|
||||
|
||||
Reference in new issue
Block a user