pip_services3_components.log.NullLogger module

pip_services3_components.log.NullLogger

Null logger implementation

copyright

Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.

license

MIT, see LICENSE for more details.

class pip_services3_components.log.NullLogger.NullLogger

Bases: pip_services3_components.log.ILogger.ILogger

Dummy implementation of logger that doesn’t do anything. It can be used in testing or in situations when logger is required but shall be disabled.

debug(correlation_id: Optional[str], message: str, *args: Any, **kwargs: Any)

Logs a high-level debug information for troubleshooting.

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • message – a human-readable message to log.

  • args – arguments to parameterize the message.

  • kwargs – arguments to parameterize the message.

error(correlation_id: Optional[str], error: Exception, message: str, *args: Any, **kwargs: Any)

Logs recoverable application error.

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • error – an error object associated with this message.

  • message – a human-readable message to log.

  • args – arguments to parameterize the message.

  • kwargs – arguments to parameterize the message.

fatal(correlation_id: Optional[str], error: Exception, message: str, *args: Any, **kwargs: Any)

Logs fatal (unrecoverable) message that caused the process to crash.

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • error – an error object associated with this message.

  • message – a human-readable message to log.

  • args – arguments to parameterize the message.

  • kwargs – arguments to parameterize the message.

get_level()pip_services3_components.log.LogLevel.LogLevel

Gets the maximum log level. Messages with higher log level are filtered out.

Returns

the maximum log level.

info(correlation_id: Optional[str], message: str, *args: Any, **kwargs: Any)

Logs an important information message

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • message – a human-readable message to log.

  • args – arguments to parameterize the message.

  • kwargs – arguments to parameterize the message.

log(level: pip_services3_components.log.LogLevel.LogLevel, correlation_id: Optional[str], error: Optional[Exception], message: Optional[str], *args: Any, **kwargs: Any)

Logs a message at specified log level.

Parameters
  • level – a log level.

  • correlation_id – (optional) transaction id to trace execution through call chain.

  • error – an error object associated with this message.

  • message – a human-readable message to log.

  • args – arguments to parameterize the message.

  • kwargs – arguments to parameterize the message.

set_level(level: pip_services3_components.log.LogLevel.LogLevel)

Set the maximum log level.

Parameters

level – a new maximum log level.

trace(correlation_id: Optional[str], message: str, *args: Any, **kwargs: Any)

Logs a low-level debug information for troubleshooting.

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • message – a human-readable message to log.

  • args – arguments to parameterize the message.

  • kwargs – arguments to parameterize the message.

warn(correlation_id: Optional[str], message: str, *args: Any, **kwargs: Any)

Logs a warning that may or may not have a negative impact.

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • message – a human-readable message to log.

  • args – arguments to parameterize the message.

  • kwargs – arguments to parameterize the message.