Skip to main content

decentriq_util.logger

Classes

PipeLogger

PipeLogger(
pipe_path: Optional[str],
)

Writes this library's diagnostics to the worker's internal log pipe, whose lines the container worker relays into the platform logs.

Deliberately not built on the logging module. The computation script owns the logging configuration in its own process, and several ordinary things it might do would silently switch these lines off: logging.config.dictConfig disables existing loggers unless told otherwise, logging.disable suppresses every logger globally, and re-configuring a logger of the same name replaces its handlers. Writing to the pipe directly touches no global state, so the library's diagnostics and the computation's logging cannot interfere in either direction.

The lines go nowhere near stdout or stderr: they must not appear in the container output a computation returns as its result.

error

def error(
self,
message: str,
)> None

info

def info(
self,
message: str,
)> None

warning

def warning(
self,
message: str,
)> None