/log

Log package for go.

Primary LanguageGoApache License 2.0Apache-2.0

log

Log package for go.

Nicely color-format-coded in development (when a TTY is attached, otherwise just plain text):

Colored

Example

package main

import (
  "errors"

  "yunion.io/x/log"
)

func main() {
  log.Debugf("Debug msg")
  log.Infof("Info msg")
  log.Warningf("Warning msg")
  err := errors.New("Unknown error")
  log.Errorf("Error msg: %v", err)
}