-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add client grpc interceptor * add draft for slog logger * fix lint * fix lint * fix lint * fix lint * fix lint * fix error * fix register * change call string * Update metrics/grpc_mw_client.go Co-authored-by: Mikhail Barshev <[email protected]> * fix mrs * go to zero log, delete logrus (#14) * go to zero log, delete logrus * fix mr error --------- Co-authored-by: Mikhail Barshev <[email protected]>
- Loading branch information
1 parent
46b9e11
commit dd1fda7
Showing
21 changed files
with
162 additions
and
969 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"os" | ||
|
||
"github.com/glebnaz/witcher/log" | ||
"github.com/sirupsen/logrus" | ||
zlog "github.com/rs/zerolog/log" | ||
) | ||
|
||
func main() { | ||
logrus.SetReportCaller(true) | ||
entry := logrus.WithFields(logrus.Fields{"id": 1}) | ||
ctx := log.AddEntryToCTX(context.Background(), entry) | ||
log.InitLog(os.Stdout, true) | ||
|
||
log.Infof(ctx, "test with id") | ||
log.Infof(context.Background(), "test without id") | ||
zlog.Debug().Msg("MSG") | ||
} | ||
|
||
//func main() { | ||
// log.InitLog(os.Stdout, true) | ||
// | ||
// zlog.Debug().Msg("MSG") | ||
//} | ||
|
||
// OUTPUT | ||
// {"level":"info","t":"2023-11-28T21:32:59+01:00","msg":"Inited prod version logger"} | ||
// {"level":"debug","t":"2023-11-28T21:32:59+01:00","msg":"MSG"} |
Oops, something went wrong.