Skip to main content

NoopLogger

No overview available.

Methods


WithField()

@classmethod
def WithField(
key: string,
value: interface{}
) - > *logrus.Entry

Adds a single field to the logger's context, returning a new logger entry with the added field. This allows for contextual logging without modifying the original logger.

Parameters

NameTypeDescription
keystringThe key for the field to be added to the log entry.
valueinterface{}The value associated with the key, which will be included in the log entry.

Returns

TypeDescription
*logrus.EntryA new logrus entry with the specified field added.

WithFields()

@classmethod
def WithFields(
fields: logrus.Fields
) - > *logrus.Entry

Adds multiple fields to the logger's context, returning a new logger entry with the added fields. This is useful for adding several pieces of contextual information at once.

Parameters

NameTypeDescription
fieldslogrus.FieldsA map of key-value pairs representing the fields to be added to the log entry.

Returns

TypeDescription
*logrus.EntryA new logrus entry with the specified fields added.

WithError()

@classmethod
def WithError(
err: error
) - > *logrus.Entry

Adds an error field to the logger's context, returning a new logger entry with the error. This method is specifically designed for logging errors with a dedicated field.

Parameters

NameTypeDescription
errerrorThe error object to be included in the log entry.

Returns

TypeDescription
*logrus.EntryA new logrus entry with the specified error added.

Debugf()

@classmethod
def Debugf(
format: string,
args: interface{}
)

Logs a message at the debug level using a format string and arguments. This method is used for detailed diagnostic information that is typically only useful during development.

Parameters

NameTypeDescription
formatstringThe format string for the log message.
argsinterface{}Arguments to be formatted into the log message string.

Infof()

@classmethod
def Infof(
format: string,
args: interface{}
)

Logs a message at the info level using a format string and arguments. This method is for general operational information that indicates normal application behavior.

Parameters

NameTypeDescription
formatstringThe format string for the log message.
argsinterface{}Arguments to be formatted into the log message string.

Warnf()

@classmethod
def Warnf(
format: string,
args: interface{}
)

Logs a message at the warn level using a format string and arguments. This method is used for potentially harmful situations or unexpected events that are not errors.

Parameters

NameTypeDescription
formatstringThe format string for the log message.
argsinterface{}Arguments to be formatted into the log message string.

Warningf()

@classmethod
def Warningf(
format: string,
args: interface{}
)

Logs a message at the warning level using a format string and arguments. This method is an alias for Warnf and is used for potentially harmful situations or unexpected events that are not errors.

Parameters

NameTypeDescription
formatstringThe format string for the log message.
argsinterface{}Arguments to be formatted into the log message string.

Errorf()

@classmethod
def Errorf(
format: string,
args: interface{}
)

Logs a message at the error level using a format string and arguments. This method is used for error events that might still allow the application to continue running.

Parameters

NameTypeDescription
formatstringThe format string for the log message.
argsinterface{}Arguments to be formatted into the log message string.

Debug()

@classmethod
def Debug(
args: interface{}
)

Logs a message at the debug level. This method is used for detailed diagnostic information that is typically only useful during development.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Info()

@classmethod
def Info(
args: interface{}
)

Logs a message at the info level. This method is for general operational information that indicates normal application behavior.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Warn()

@classmethod
def Warn(
args: interface{}
)

Logs a message at the warn level. This method is used for potentially harmful situations or unexpected events that are not errors.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Warning()

@classmethod
def Warning(
args: interface{}
)

Logs a message at the warning level. This method is an alias for Warn and is used for potentially harmful situations or unexpected events that are not errors.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Error()

@classmethod
def Error(
args: interface{}
)

Logs a message at the error level. This method is used for error events that might still allow the application to continue running.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Debugln()

@classmethod
def Debugln(
args: interface{}
)

Logs a message at the debug level, appending a newline character. This method is used for detailed diagnostic information that is typically only useful during development.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Infoln()

@classmethod
def Infoln(
args: interface{}
)

Logs a message at the info level, appending a newline character. This method is for general operational information that indicates normal application behavior.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Warnln()

@classmethod
def Warnln(
args: interface{}
)

Logs a message at the warn level, appending a newline character. This method is used for potentially harmful situations or unexpected events that are not errors.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Warningln()

@classmethod
def Warningln(
args: interface{}
)

Logs a message at the warning level, appending a newline character. This method is an alias for Warnln and is used for potentially harmful situations or unexpected events that are not errors.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Errorln()

@classmethod
def Errorln(
args: interface{}
)

Logs a message at the error level, appending a newline character. This method is used for error events that might still allow the application to continue running.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged.

Print()

@classmethod
def Print(
: interface{}
)

Prints a message to the logger's output. This method is a generic logging function that does not specify a log level.

Parameters

NameTypeDescription
****interface{}Arguments to be printed.

Printf()

@classmethod
def Printf(
: string,
: interface{}
)

Prints a formatted message to the logger's output. This method is a generic logging function that does not specify a log level.

Parameters

NameTypeDescription
****stringThe format string for the message.
****interface{}Arguments to be formatted into the message string.

Println()

@classmethod
def Println(
: interface{}
)

Prints a message to the logger's output, appending a newline character. This method is a generic logging function that does not specify a log level.

Parameters

NameTypeDescription
****interface{}Arguments to be printed.

Fatal()

@classmethod
def Fatal(
: interface{}
)

Logs a message at the fatal level and then exits the application. This method is used for critical errors that prevent the application from continuing.

Parameters

NameTypeDescription
****interface{}Arguments to be logged before exiting.

Fatalf()

@classmethod
def Fatalf(
: string,
: interface{}
)

Logs a formatted message at the fatal level and then exits the application. This method is used for critical errors that prevent the application from continuing.

Parameters

NameTypeDescription
****stringThe format string for the log message.
****interface{}Arguments to be formatted into the log message string before exiting.

Fatalln()

@classmethod
def Fatalln(
: interface{}
)

Logs a message at the fatal level, appending a newline character, and then exits the application. This method is used for critical errors that prevent the application from continuing.

Parameters

NameTypeDescription
****interface{}Arguments to be logged before exiting.

Panic()

@classmethod
def Panic(
: interface{}
)

Logs a message at the panic level and then panics. This method is used for unrecoverable errors that should cause the program to crash.

Parameters

NameTypeDescription
****interface{}Arguments to be logged before panicking.

Panicf()

@classmethod
def Panicf(
: string,
: interface{}
)

Logs a formatted message at the panic level and then panics. This method is used for unrecoverable errors that should cause the program to crash.

Parameters

NameTypeDescription
****stringThe format string for the log message.
****interface{}Arguments to be formatted into the log message string before panicking.

Panicln()

@classmethod
def Panicln(
: interface{}
)

Logs a message at the panic level, appending a newline character, and then panics. This method is used for unrecoverable errors that should cause the program to crash.

Parameters

NameTypeDescription
****interface{}Arguments to be logged before panicking.