Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.51 KB

README.md

File metadata and controls

52 lines (32 loc) · 1.51 KB

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