package
module
Version:
v0.0.0-...-123c969
Opens a new window with list of versions in this module.
Published: Nov 12, 2018
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Logrus
A logrus implementation of log.Logger
.
For more on the interface and other implementations, see the log README.
package main
import (
logr "github.com/go-log/logrus"
"github.com/sirupsen/logrus"
)
func main {
l := logr.WithFields(logrus.Fields{
"foo": "bar",
})
l.Log("a log line")
}
You can also use print.New
to convert logrus loggers to log.Logger
.
For an example, see here.
Documentation
¶
Package logrus allows the creation of Loggers based on logrus.StandardLogger().
WithFields creates a new logger based on logrus.StandardLogger().
WithFields creates a new logger based on logrus.WithFields().
Source Files
¶
Click to show internal directories.
Click to hide internal directories.