Skip to content

Commit

Permalink
Merge pull request #521 from jsimonlane/update_readme
Browse files Browse the repository at this point in the history
Improve README with recommendations for SwiftUI
  • Loading branch information
skreutzberger committed Apr 9, 2024
2 parents d60a21a + ee7cf40 commit d3cb30d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Expand Up @@ -163,6 +163,28 @@ log.info("my data", context: [1, "a", 2]) // "INFO: my data [1, \"a\", 2]"

```

Alternatively, if you are using SwiftUI, consider using the following setup:

```swift
import SwiftyBeaver
let logger = SwiftyBeaver.self

@main
struct yourApp: App {

init() {
let console = ConsoleDestination()
logger.addDestination(console)
// etc...
}

var body: some Scene {
WindowGroup {
}
}
}
```

<br/>
<br/>

Expand Down

0 comments on commit d3cb30d

Please sign in to comment.