Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

zevst/zlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zlog is a wrapper for uber-go/zap

Install
go get -u github.com/zevst/zlog

By default, log displays messages in STDOUT. You can override current logger using the config.

Example
# example config for zlog.MultiLogger
stdout:
  level: -1
  format: -1
  color: true
kibana:
  level: 1
  out:
    filename: filepath.log
var config *zlog.Setting // OR zlog.MultiLogger
_ = viper.ReadInConfig()
_ = viper.Unmarshal(&config)
zlog.Start(config.Core())
defer zlog.End()

Formats

-1          Console
 1  Default Json

Levels

-1          DebugLevel
 1  Default InfoLevel
 2          WarnLevel
 3          ErrorLevel
 4          DPanicLevel
 5          PanicLevel
 6          FatalLevel