Skip to content

qclaogui/lg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lg

License

Project logger packaging for github.com/uber-go/zap

Getting Started

Suitable for project log in the container

Installation

go get -u github.com/qclaogui/lg

package main

import (
	"github.com/qclaogui/lg"
)

func main() {
	//lg.TimeFormat = time.RFC3339Nano

	// lvl - global log level: Debug(-1), Info(0), Warn(1), Error(2), DPanic(3), Panic(4), Fatal(5)
	_ = lg.Init(-1, "demo-project")

	lg.APPLog.Info("Happy Goding!")
}
// Output: {"level":"info","ts":1564834577.710078,"msg":"Happy Goding!","info":{"project":"demo-project","hostname":"qclaogui.local"}}

Versioning

Using SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Project logger packaging for zap

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages