Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 414 Bytes

README.md

File metadata and controls

18 lines (16 loc) · 414 Bytes

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")