Skip to content

Commit

Permalink
chore: minor doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
damianopetrungaro committed May 20, 2022
1 parent a2da154 commit dd03727
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,11 @@ var logger golog.Logger = golog.New(
)
```

Out of the box are provided some checkers
for skipping log with level lower than an expected one.
Out of the box are provided some checkers:

### Min level checker

This checker will skip logging all the entry with level lower than an expected one.

Example usage:

Expand All @@ -178,7 +181,7 @@ var logger golog.Logger = golog.New(
)
```

### Custom field type
## Custom field type

Logging complex data structure is not intentionally supported out of the box,
Golog expects you to implement a FieldMapper interface.
Expand Down Expand Up @@ -208,13 +211,6 @@ var u User{...}
golog.With(golog.Mapper("user", u)).Debug(ctx, "...")
```

And its usage would look like this

```go
// Example API usage
golog.With(NewUserFields(u)).Error("an error occurred")
```

## Writers

Based on your need you may want to use different entry writers.
Expand Down

0 comments on commit dd03727

Please sign in to comment.