Source File
exported.go
Belonging Package
github.com/sirupsen/logrus
package logrusimport ()var (// std is the name of the standard logger in stdlib `log`std = New())func () *Logger {return std}// SetOutput sets the standard logger output.func ( io.Writer) {std.SetOutput()}// SetFormatter sets the standard logger formatter.func ( Formatter) {std.SetFormatter()}// SetReportCaller sets whether the standard logger will include the calling// method as a field.func ( bool) {std.SetReportCaller()}// SetLevel sets the standard logger level.func ( Level) {std.SetLevel()}// GetLevel returns the standard logger level.func () Level {return std.GetLevel()}// IsLevelEnabled checks if the log level of the standard logger is greater than the level paramfunc ( Level) bool {return std.IsLevelEnabled()}// AddHook adds a hook to the standard logger hooks.func ( Hook) {std.AddHook()}// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.func ( error) *Entry {return std.WithField(ErrorKey, )}// WithContext creates an entry from the standard logger and adds a context to it.func ( context.Context) *Entry {return std.WithContext()}// WithField creates an entry from the standard logger and adds a field to// it. If you want multiple fields, use `WithFields`.//// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal// or Panic on the Entry it returns.func ( string, interface{}) *Entry {return std.WithField(, )}// WithFields creates an entry from the standard logger and adds multiple// fields to it. This is simply a helper for `WithField`, invoking it// once for each field.//// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal// or Panic on the Entry it returns.func ( Fields) *Entry {return std.WithFields()}// WithTime creates an entry from the standard logger and overrides the time of// logs generated with it.//// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal// or Panic on the Entry it returns.func ( time.Time) *Entry {return std.WithTime()}// Trace logs a message at level Trace on the standard logger.func ( ...interface{}) {std.Trace(...)}// Debug logs a message at level Debug on the standard logger.func ( ...interface{}) {std.Debug(...)}// Print logs a message at level Info on the standard logger.func ( ...interface{}) {std.Print(...)}// Info logs a message at level Info on the standard logger.func ( ...interface{}) {std.Info(...)}// Warn logs a message at level Warn on the standard logger.func ( ...interface{}) {std.Warn(...)}// Warning logs a message at level Warn on the standard logger.func ( ...interface{}) {std.Warning(...)}// Error logs a message at level Error on the standard logger.func ( ...interface{}) {std.Error(...)}// Panic logs a message at level Panic on the standard logger.func ( ...interface{}) {std.Panic(...)}// Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.func ( ...interface{}) {std.Fatal(...)}// TraceFn logs a message from a func at level Trace on the standard logger.func ( LogFunction) {std.TraceFn()}// DebugFn logs a message from a func at level Debug on the standard logger.func ( LogFunction) {std.DebugFn()}// PrintFn logs a message from a func at level Info on the standard logger.func ( LogFunction) {std.PrintFn()}// InfoFn logs a message from a func at level Info on the standard logger.func ( LogFunction) {std.InfoFn()}// WarnFn logs a message from a func at level Warn on the standard logger.func ( LogFunction) {std.WarnFn()}// WarningFn logs a message from a func at level Warn on the standard logger.func ( LogFunction) {std.WarningFn()}// ErrorFn logs a message from a func at level Error on the standard logger.func ( LogFunction) {std.ErrorFn()}// PanicFn logs a message from a func at level Panic on the standard logger.func ( LogFunction) {std.PanicFn()}// FatalFn logs a message from a func at level Fatal on the standard logger then the process will exit with status set to 1.func ( LogFunction) {std.FatalFn()}// Tracef logs a message at level Trace on the standard logger.func ( string, ...interface{}) {std.Tracef(, ...)}// Debugf logs a message at level Debug on the standard logger.func ( string, ...interface{}) {std.Debugf(, ...)}// Printf logs a message at level Info on the standard logger.func ( string, ...interface{}) {std.Printf(, ...)}// Infof logs a message at level Info on the standard logger.func ( string, ...interface{}) {std.Infof(, ...)}// Warnf logs a message at level Warn on the standard logger.func ( string, ...interface{}) {std.Warnf(, ...)}// Warningf logs a message at level Warn on the standard logger.func ( string, ...interface{}) {std.Warningf(, ...)}// Errorf logs a message at level Error on the standard logger.func ( string, ...interface{}) {std.Errorf(, ...)}// Panicf logs a message at level Panic on the standard logger.func ( string, ...interface{}) {std.Panicf(, ...)}// Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1.func ( string, ...interface{}) {std.Fatalf(, ...)}// Traceln logs a message at level Trace on the standard logger.func ( ...interface{}) {std.Traceln(...)}// Debugln logs a message at level Debug on the standard logger.func ( ...interface{}) {std.Debugln(...)}// Println logs a message at level Info on the standard logger.func ( ...interface{}) {std.Println(...)}// Infoln logs a message at level Info on the standard logger.func ( ...interface{}) {std.Infoln(...)}// Warnln logs a message at level Warn on the standard logger.func ( ...interface{}) {std.Warnln(...)}// Warningln logs a message at level Warn on the standard logger.func ( ...interface{}) {std.Warningln(...)}// Errorln logs a message at level Error on the standard logger.func ( ...interface{}) {std.Errorln(...)}// Panicln logs a message at level Panic on the standard logger.func ( ...interface{}) {std.Panicln(...)}// Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1.func ( ...interface{}) {std.Fatalln(...)}
![]() |
The pages are generated with Golds v0.3.6. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |