Skip to content
/ zlog Public

Uber based zaplog carries out simple and crude encapsulation, allowing users to quickly develop log modules

License

Notifications You must be signed in to change notification settings

miajio/zlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zlog

Uber based zaplog carries out simple and crude encapsulation, allowing users to quickly develop log modules

Install

go get -u github.com/miajio/zlog

package zlog_test

import (
	"testing"

	"github.com/miajio/zlog"
)

func TestLoggerFile(t *testing.T) {
    // set log param
	l := zlog.Logger{
		Path:       "./log",
		MaxSize:    256,
		MaxBackups: 10,
		MaxAge:     7,
		Compress:   false,
	}
    // set log level func
	lv := zlog.LogMap{
		"debug": zlog.DebufLevel,
		"info":  zlog.InfoLevel,
		"error": zlog.ErrorLevel,
	}
    // init logger
	l.Generate(lv)
    // info
	l.Log.Info("hello")
}

About

Uber based zaplog carries out simple and crude encapsulation, allowing users to quickly develop log modules

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages