Skip to content

Commit 34ee4aa

Browse files
committed
Fix documentation about logger
1 parent bf10506 commit 34ee4aa

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,16 @@ The logger can be modified by assigning a logger to `orchestra.Logger`
209209

210210
```go
211211
type Logger interface {
212-
Log(msg string, attrs ...slog.Attr)
212+
Info(msg string, attrs ...slog.Attr)
213+
Error(msg string, attrs ...slog.Attr)
214+
WithGroup(name string) Logger
213215
}
214216
```
215217

216218
If you have an existing `*slog.Logger`, you can create an `orchestra.Logger` by using the `orchestra.LoggerFromSlog` function.
217219

218220
```go
219-
orchestraLogger := orchestra.LoggerFromSlog(slog.Default())
221+
orchestraLogger := orchestra.LoggerFromSlog(slog.LevelInfo, slog.LevelError, slog.Default())
220222
```
221223

222224
## Contributing

0 commit comments

Comments
 (0)