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 field key. This can be any type.

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 all specified fields. This is useful for adding several pieces of contextual information at once.

Parameters

NameTypeDescription
fieldslogrus.FieldsA map of field keys and values 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. This method is specifically designed to include error details in log messages.

Parameters

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

Returns

TypeDescription
*logrus.EntryA new logrus entry with the error field 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 flow.

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 indicates 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 indicates 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 indicates a serious problem that prevents some functionality from working correctly.

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. These will be joined with spaces.

Info()

@classmethod
def Info(
args: interface{}
)

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

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged. These will be joined with spaces.

Warn()

@classmethod
def Warn(
args: interface{}
)

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

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged. These will be joined with spaces.

Warning()

@classmethod
def Warning(
args: interface{}
)

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

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged. These will be joined with spaces.

Error()

@classmethod
def Error(
args: interface{}
)

Logs a message at the error level. This method indicates a serious problem that prevents some functionality from working correctly.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged. These will be joined with spaces.

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. These will be joined with spaces and a newline appended.

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 flow.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged. These will be joined with spaces and a newline appended.

Warnln()

@classmethod
def Warnln(
args: interface{}
)

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

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged. These will be joined with spaces and a newline appended.

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 indicates potentially harmful situations or unexpected events that are not errors.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged. These will be joined with spaces and a newline appended.

Errorln()

@classmethod
def Errorln(
args: interface{}
)

Logs a message at the error level, appending a newline character. This method indicates a serious problem that prevents some functionality from working correctly.

Parameters

NameTypeDescription
argsinterface{}Arguments to be logged. These will be joined with spaces and a newline appended.

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. These will be joined with spaces.

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. These will be joined with spaces and a newline appended.

Fatal()

@classmethod
def Fatal(
: interface{}
)

Logs a message at the fatal level and then exits the application. This method indicates an unrecoverable error that requires the program to terminate.

Parameters

NameTypeDescription
****interface{}Arguments to be logged before exiting. These will be joined with spaces.

Fatalf()

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

Logs a formatted message at the fatal level and then exits the application. This method indicates an unrecoverable error that requires the program to terminate.

Parameters

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

Fatalln()

@classmethod
def Fatalln(
: interface{}
)

Logs a message at the fatal level, appending a newline, and then exits the application. This method indicates an unrecoverable error that requires the program to terminate.

Parameters

NameTypeDescription
****interface{}Arguments to be logged before exiting. These will be joined with spaces and a newline appended.

Panic()

@classmethod
def Panic(
: interface{}
)

Logs a message at the panic level and then panics. This method indicates a severe, unrecoverable error that causes the program to crash if not recovered.

Parameters

NameTypeDescription
****interface{}Arguments to be logged before panicking. These will be joined with spaces.

Panicf()

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

Logs a formatted message at the panic level and then panics. This method indicates a severe, unrecoverable error that causes the program to crash if not recovered.

Parameters

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

Panicln()

@classmethod
def Panicln(
: interface{}
)

Logs a message at the panic level, appending a newline, and then panics. This method indicates a severe, unrecoverable error that causes the program to crash if not recovered.

Parameters

NameTypeDescription
****interface{}Arguments to be logged before panicking. These will be joined with spaces and a newline appended.