minitrino.core.logging.spinner module#

Spinner logging utility.

class minitrino.core.logging.spinner.LogBuffer[source][source]#

Bases: object

Helper class for buffering and replaying log messages.

Buffers messages as (msg, is_spinner_artifact, stream) tuples and can flush them to the appropriate output stream.

append(msg: str, is_spinner_artifact: bool, stream: str) None[source][source]#

Append a log message to the buffer.

flush() None[source][source]#

Flush the buffer to the appropriate output stream.

class minitrino.core.logging.spinner.Spinner(logger: MinitrinoLogger, log_sink: Callable[[str, str, bool], None] | None = None, always_verbose: bool = False)[source][source]#

Bases: object

Spinner logging utility.

Displays a spinner while a task is in progress.

The spinner only appears if:

  • stdout is a TTY

  • log level is not DEBUG

Parameters:
  • logger (MinitrinoLogger) – The logger instance to use for spinner state.

  • log_sink (Callable[[str, str, bool], None] | None) – The log sink to use for spinner state.

  • always_verbose (bool) – If True, disables spinner and always streams logs directly.

spinner(message: str = '')[source][source]#

Display a spinner while a task is in progress.

If not a TTY or logging to a file, disables spinner and buffering.

Parameters:

message (str) – Message to display alongside the spinner.