Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages