Skip to content

imroc/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

log

log is a simple and useful logging tool of Go. see API.

Features

  • light weight
  • easy to use

Note

there is only 2 log level(Debug,Info) the philosophy of this can be found in here

Quick Start

Installation
go get github.com/imroc/log
Simple Usage
import (
	"github.com/imroc/log"
)

func main() {
	log.Debug("debug ", "message")
	log.Infof("%s message", "info")
}

output:

2016/10/04 14:38:38 [DEBG] main.go:7 debug message
2016/10/04 14:38:38 [INFO] main.go:8 info message
More Control
log.SetFilename("test.log")
log.SetFlag(log.Ldate | log.Ltime | log.Llongfile)
log.SetDebug(false)

LICENSE

log is is distributed under the terms of the MIT License.

About

simple and useful logging tool of Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages