doc.go 586 B

1234567891011121314151617181920212223242526
  1. /*
  2. Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
  3. The simplest way to use Logrus is simply the package-level exported logger:
  4. package main
  5. import (
  6. log "github.com/sirupsen/logrus"
  7. )
  8. func main() {
  9. log.WithFields(log.Fields{
  10. "animal": "walrus",
  11. "number": 1,
  12. "size": 10,
  13. }).Info("A walrus appears")
  14. }
  15. Output:
  16. time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
  17. For a full guide visit https://github.com/sirupsen/logrus
  18. */
  19. package logrus