cellmap_flow.dashboard.routes.logging_routes

Attributes

logger

logging_bp

Classes

LogHandler

Feeds the log panel: each record into the session's log_buffer, and

Functions

stream_logs()

The log panel's records as Server-Sent Events: the buffer's, then

get_bbox_json_template()

Serve the bounding box JSON format template

Module Contents

cellmap_flow.dashboard.routes.logging_routes.logger
cellmap_flow.dashboard.routes.logging_routes.logging_bp
class cellmap_flow.dashboard.routes.logging_routes.LogHandler(level=NOTSET)

Feeds the log panel: each record into the session’s log_buffer, and to every open stream’s queue.

It runs on whichever thread logged, often one with no app context (a launch, a job monitor), so it asks for the session at emit time.

emit(record)

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

cellmap_flow.dashboard.routes.logging_routes.stream_logs()

The log panel’s records as Server-Sent Events: the buffer’s, then each new one as it is logged, with a keepalive comment every 30 s.

cellmap_flow.dashboard.routes.logging_routes.get_bbox_json_template()

Serve the bounding box JSON format template