Skip to content

frobenius/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logger Go License: MIT Build Status

Logging library for Go

Features

  • Very simple and intuitive api
  • Log messages are written to file throught go routine in order to avoid delays
  • Global logger ready to use to log on standard output
  • Rolling files by size and/or date
  • Log level colored

Code samples

  • Use global logger

    Infof("This is a global log message at INFO level")
    Warningf("This is another global log message at WARN level")
  • Log on file

    var log = NewLogger("file.log", 1024*1024, 5, Trace, 0666)
    log.Infof("This log message will be written on file.log")
    log.Flush()

About

Logging library for Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages