add data
This commit is contained in:
parent
140a51f39e
commit
3e6bfd4a18
|
@ -8,7 +8,11 @@ import (
|
||||||
|
|
||||||
type (
|
type (
|
||||||
// LogData for tracking
|
// LogData for tracking
|
||||||
LogData map[string]interface{}
|
LogData struct {
|
||||||
|
Source string
|
||||||
|
Message string
|
||||||
|
Data interface{}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -19,7 +23,7 @@ var (
|
||||||
// Init ...
|
// Init ...
|
||||||
func Init(appName, server string) {
|
func Init(appName, server string) {
|
||||||
cfg := zap.Config{
|
cfg := zap.Config{
|
||||||
Encoding: "json",
|
Encoding: "console",
|
||||||
Level: zap.NewAtomicLevelAt(zapcore.DebugLevel),
|
Level: zap.NewAtomicLevelAt(zapcore.DebugLevel),
|
||||||
OutputPaths: []string{"stdout"},
|
OutputPaths: []string{"stdout"},
|
||||||
InitialFields: map[string]interface{}{"server": server, "capture": appName},
|
InitialFields: map[string]interface{}{"server": server, "capture": appName},
|
||||||
|
|
Loading…
Reference in New Issue