Skip to content

qclaogui/lg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d604b73 · Aug 11, 2019

History

7 Commits
Aug 3, 2019
Aug 3, 2019
Aug 2, 2019
Aug 3, 2019
Aug 11, 2019
Aug 11, 2019
Aug 11, 2019
Aug 3, 2019

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