This commit is contained in:
namhq1989 2022-08-23 16:10:31 +07:00
parent 140a51f39e
commit 3e6bfd4a18
1 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,11 @@ import (
type (
// LogData for tracking
LogData map[string]interface{}
LogData struct {
Source string
Message string
Data interface{}
}
)
var (
@ -19,7 +23,7 @@ var (
// Init ...
func Init(appName, server string) {
cfg := zap.Config{
Encoding: "json",
Encoding: "console",
Level: zap.NewAtomicLevelAt(zapcore.DebugLevel),
OutputPaths: []string{"stdout"},
InitialFields: map[string]interface{}{"server": server, "capture": appName},