Skip to content

Latest commit

 

History

History

zap

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

log

The logging implemented byzap

Usage

import (
    "github.com/segmentfault/pacman/contrib/log/zap"
    "github.com/segmentfault/pacman/log"
)
    log.SetLogger(zap.NewLogger(log.ParseLevel(logLevel), zap.WithName(Name), zap.WithPath(logPath), zap.WithCallerFullPath()))
    log.Debug("test")
    log.Info("test")
    log.Warn("test")
    log.Error("test")