Skip to content

bobbyz3g/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log

A simple log library based on github.com/uber-go/zap.

Installation

$ go get -u github.com/Kaiser925/log

Quick start

Log message

package main

import "github.com/Kaiser925/log"

func main() {
	defer log.Flush()
	log.Info("Hello world")
}

Log with custom options

package main

import "github.com/Kaiser925/log"

func main() {
	defer log.Flush()
	log.Init(&log.Option{
		Level: log.DebugLevel.String(),
		Format: log.JsonFormat,
		EnableCaller: true,
		EnableColor: false,
    })
	log.Info("Hello world")
}

Released under the BSD 3-Clause License

About

A simple log library based on github.com/uber-go/zap

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages