Skip to content

deep-compute/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

log

light abstraction over https://github.com/inconshreveable/log15

Usage

Initialize it once in the main program as follows -

import "github.com/deep-compute/log"

func main() {
    quiet := True
    filename := "/tmp/test.log"
    level := "debug"

    hdlr, err := log.MakeBasicHandler(filename, level, quiet)
    if err != nil {
        panic(err)
    }

    log.SetHandler(hdlr)
}

All other packages need simply import and start logging wherever necessary

import "github.com/deep-compute/log"

func Foo() {
    log.Info("inside function Foo")
}

About

light abstraction over https://github.com/inconshreveable/log15

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages