Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilliams0305 authored Nov 6, 2023
1 parent 022881a commit 4aff4b3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,13 @@ Creating custom sink writers compatible with golog is as simple as
implementing the `SinkWriter` interface.

```go

type SinkWriter interface {
WriteTo(message LogEvent) error
}
```

Example: the provided /fmtsink implements `SinkWriter`
and passes the data off to a formatting function.
```go
type FmtPrinter struct {
}
Expand All @@ -77,3 +81,10 @@ func (f *FmtPrinter) WriteTo(message golog.LogEvent) error {
}
```

This new type can now be used during configuration and passed
into the `WriteTo` step.

Currently the `WriteTo` functions are executed on a go
function. The intent here is to prevent blocking when logging to remote servers.
In the future this behavior will be configurable during setup.

0 comments on commit 4aff4b3

Please sign in to comment.