mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-25 11:06:43 +08:00
zap
This commit is contained in:
parent
df78784ede
commit
9995b1c8ab
@ -55,11 +55,12 @@ type ZapLogger struct {
|
|||||||
|
|
||||||
func NewZapLogger() (*ZapLogger, error) {
|
func NewZapLogger() (*ZapLogger, error) {
|
||||||
zapConfig := zap.Config{
|
zapConfig := zap.Config{
|
||||||
Level: zap.NewAtomicLevelAt(zapcore.DebugLevel),
|
Level: zap.NewAtomicLevelAt(zapcore.DebugLevel),
|
||||||
Development: true,
|
Development: true,
|
||||||
Encoding: "json",
|
Encoding: "json",
|
||||||
EncoderConfig: zap.NewProductionEncoderConfig(),
|
EncoderConfig: zap.NewProductionEncoderConfig(),
|
||||||
InitialFields: map[string]interface{}{"PID": os.Getegid()},
|
DisableStacktrace: true,
|
||||||
|
InitialFields: map[string]interface{}{"PID": os.Getegid()},
|
||||||
}
|
}
|
||||||
zl := &ZapLogger{}
|
zl := &ZapLogger{}
|
||||||
if config.Config.Log.Stderr {
|
if config.Config.Log.Stderr {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user