Skip to content
forked from alecthomas/log4go

Logging package similar to log4j for the Go programming language

License

Notifications You must be signed in to change notification settings

ccpaging/log4go

 
 

Repository files navigation

log4go colored

Please see http://log4go.googlecode.com/

Installation:

  • Run go get github.com/ccpaging/log4go

  • Run go get github.com/daviddengcn/go-colortext

OR

  • Run go install github.com/ccpaging/log4go

  • Run go install github.com/daviddengcn/go-colortext

Usage:

  • Add the following import:

import log "github.com/ccpaging/log4go"

  • Sample
package main

import (
	log "github.com/ccpaging/log4go"
)

func main() {
    log.Debug("This is Debug")
    log.Info("This is Info")

    // Compatibility with `log`
    log.Print("This is Print()")
    log.Println("This is Println()")
    log.Panic("This is Panic()")
}

Acknowledgements:

  • ccpaging For providing awesome patches to bring colored log4go up to the latest Go spec

Reference:

  1. https://github.com/alecthomas/log4go/
  2. https://github.com/ngmoco/timber
  3. https://github.com/siddontang/go/tree/master/log
  4. https://github.com/sirupsen/logrus

About

Logging package similar to log4j for the Go programming language

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%