NullLogger

class coba.context.NullLogger

A logger which writes nothing.

Constructors

__init__(sink: ~coba.primitives.Sink[str] = <coba.pipes.sinks.NullSink object>) None

Instantiate a NullLogger.

Parameters:

sink – The sink to write to (by default null).

Methods

log(message: str | Exception) ContextManager[Logger]

Log a message or exception to the sink.

Parameters:

message – The message or exception that should be logged.

Returns:

A ContextManager that controls hierarchy.

time(message: str) ContextManager[Logger]

Log a timed message to the sink.

Parameters:

message – The message that should be logged.

Returns:

A ContextManager that controls when timing stops.

Attributes

sink