Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanhorstmann committed Dec 29, 2020
1 parent 28cf0db commit 32ec944
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A stdout/stderr demuxer hook for Logrus

[Logrus](https://github.com/Sirupsen/logrus) loggers always output all log levels to a single common output, e.g. `stderr`.
This logrus hook makes it so that logs with a severity below `Error` are written to `stdout` while all the important stuff goes to `stderr`.
[Logrus](https://github.com/sirupsen/logrus) loggers always output all log levels to a single common output, e.g. `stderr`.
This logrus hook makes it so that logs with a severity below `Warning` are written to `stdout` while all the important stuff goes to `stderr`.

You can also use the hook to demux logs to custom IO writers based on severity. Just override the default outputs using the hook's `SetOutput(infoLevel, errorLevel io.Writer)` method.

Expand All @@ -11,7 +11,7 @@ Given you have an application that uses a the logrus standard logger similar to

```go
import (
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

func main() {
Expand All @@ -28,8 +28,8 @@ The only change required is adding in the hook. Make sure to configure the paren
```go
import (
log "github.com/Sirupsen/logrus"
"github.com/janeczku/stdemuxerhook"
log "github.com/sirupsen/logrus"
"github.com/Superbalist/stdemuxerhook"
)

func main() {
Expand Down

0 comments on commit 32ec944

Please sign in to comment.