Source File
exported.go
Belonging Package
github.com/sirupsen/logrus
package logrusimport ()// std is the package-level standard logger, similar to the default logger// in the stdlib [log] package.var std = New()// StandardLogger returns the package-level standard logger used by// the top-level logging functions.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 logging for the given level is enabled for the standard logger.func ( 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.WithError()}// 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 single field.// For multiple fields, prefer [WithFields] over chaining WithField calls.func ( string, any) *Entry {return std.WithField(, )}// WithFields creates an entry from the standard logger and adds the fields to it.func ( Fields) *Entry {return std.WithFields()}// WithTime creates an entry from the standard logger and overrides the time// used for logs generated with it.func ( time.Time) *Entry {return std.WithTime()}// Trace logs a message at level [TraceLevel] on the standard logger.func ( ...any) {std.Trace(...)}// Debug logs a message at level [DebugLevel] on the standard logger.func ( ...any) {std.Debug(...)}// Print logs a message at level [InfoLevel] on the standard logger.func ( ...any) {std.Print(...)}// Info logs a message at level [InfoLevel] on the standard logger.func ( ...any) {std.Info(...)}// Warn logs a message at level [WarnLevel] on the standard logger.func ( ...any) {std.Warn(...)}// Warning logs a message at level [WarnLevel] on the standard logger.func ( ...any) {std.Warning(...)}// Error logs a message at level [ErrorLevel] on the standard logger.func ( ...any) {std.Error(...)}// Panic logs a message at level [PanicLevel] on the standard logger.func ( ...any) {std.Panic(...)}// Fatal logs a message at level [FatalLevel] on the standard logger,// then exits the process with status 1.func ( ...any) {std.Fatal(...)}// TraceFn logs a message from a func at level [TraceLevel] on the standard logger.func ( LogFunction) {std.TraceFn()}// DebugFn logs a message from a func at level [DebugLevel] on the standard logger.func ( LogFunction) {std.DebugFn()}// PrintFn logs a message from a func at level [InfoLevel] on the standard logger.func ( LogFunction) {std.PrintFn()}// InfoFn logs a message from a func at level [InfoLevel] on the standard logger.func ( LogFunction) {std.InfoFn()}// WarnFn logs a message from a func at level [WarnLevel] on the standard logger.func ( LogFunction) {std.WarnFn()}// WarningFn logs a message from a func at level [WarnLevel] on the standard logger.func ( LogFunction) {std.WarningFn()}// ErrorFn logs a message from a func at level [ErrorLevel] on the standard logger.func ( LogFunction) {std.ErrorFn()}// PanicFn logs a message from a func at level [PanicLevel] on the standard logger.func ( LogFunction) {std.PanicFn()}// FatalFn logs a message from a func at level [FatalLevel] on the standard logger,// then exits the process with status 1.func ( LogFunction) {std.FatalFn()}// Tracef logs a message at level [TraceLevel] on the standard logger.func ( string, ...any) {std.Tracef(, ...)}// Debugf logs a message at level [DebugLevel] on the standard logger.func ( string, ...any) {std.Debugf(, ...)}// Printf logs a message at level [InfoLevel] on the standard logger.func ( string, ...any) {std.Printf(, ...)}// Infof logs a message at level [InfoLevel] on the standard logger.func ( string, ...any) {std.Infof(, ...)}// Warnf logs a message at level [WarnLevel] on the standard logger.func ( string, ...any) {std.Warnf(, ...)}// Warningf logs a message at level [WarnLevel] on the standard logger.func ( string, ...any) {std.Warningf(, ...)}// Errorf logs a message at level [ErrorLevel] on the standard logger.func ( string, ...any) {std.Errorf(, ...)}// Panicf logs a message at level [PanicLevel] on the standard logger.func ( string, ...any) {std.Panicf(, ...)}// Fatalf logs a message at level [FatalLevel] on the standard logger,// then exits the process with status 1.func ( string, ...any) {std.Fatalf(, ...)}// Traceln logs a message at level [TraceLevel] on the standard logger.func ( ...any) {std.Traceln(...)}// Debugln logs a message at level [DebugLevel] on the standard logger.func ( ...any) {std.Debugln(...)}// Println logs a message at level [InfoLevel] on the standard logger.func ( ...any) {std.Println(...)}// Infoln logs a message at level [InfoLevel] on the standard logger.func ( ...any) {std.Infoln(...)}// Warnln logs a message at level [WarnLevel] on the standard logger.func ( ...any) {std.Warnln(...)}// Warningln logs a message at level [WarnLevel] on the standard logger.func ( ...any) {std.Warningln(...)}// Errorln logs a message at level [ErrorLevel] on the standard logger.func ( ...any) {std.Errorln(...)}// Panicln logs a message at level [PanicLevel] on the standard logger.func ( ...any) {std.Panicln(...)}// Fatalln logs a message at level [FatalLevel] on the standard logger,// then exits the process with status 1.func ( ...any) {std.Fatalln(...)}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux 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 @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |