Skip to content

Commit e0ebe4c

Browse files
feat: Update Readme.md
1 parent cb33feb commit e0ebe4c

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,22 @@ lazy var appStatePublisher = _appState.publisher
5858
.eraseToAnyPublisher()
5959
```
6060

61+
## Logging
62+
```swift
63+
struct SamplePersistenceMonitor: PersistenceMonitor {
64+
65+
func didReceive(_ monitor: any PersistenceMonitor, error: any Error) {
66+
print("Error received: \(error.localizedDescription)")
67+
}
68+
69+
func didReceive(_ monitor: any PersistenceMonitor, message: String) {
70+
print("Message received: \(message)")
71+
}
72+
73+
}
74+
75+
GoodPersistence.Configuration.configure(monitors: [SamplePersistenceMonitor()])
76+
```
77+
6178
## License
6279
GoodPersistence is released under the MIT license. See [LICENSE](LICENSE.md) for details.

0 commit comments

Comments
 (0)