From dd0372760b2157b37dd71cc0cf07f63bdc4508e4 Mon Sep 17 00:00:00 2001 From: Damiano Petrungaro Date: Fri, 20 May 2022 16:40:18 +0200 Subject: [PATCH] chore: minor doc updates --- README.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 34c9110..9537574 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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. @@ -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.