ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

Deliver records to an owned sink through a bounded background queue.

Notes

Reject full queues with queue.Full at every severity. Drain accepted records on close and surface background delivery failures to the caller.

Method __init__ Start a bounded background listener for an owned logging sink.
Method _observeFailure Observe a sink failure without replacing the retained shutdown error.
Method close Stop admission, drain queued records, and close the owned sink.
Method emit Enqueue a record snapshot without waiting for queue capacity.
Method flush Wait for queued work, then flush the owned sink and surface failures.
Instance Variable _listener Listener produced by _Listener.
Instance Variable _queue Name of the queue receiving or storing the job.
Instance Variable _stopped Stopped flag used by BoundedQueueHandler.
Instance Variable _target Owned sink, closed after the queue drains.
def __init__(self: Self, target: logging.Handler, capacity: int, *, app: object | None = None): (source)

Start a bounded background listener for an owned logging sink.

Parameters
target:logging.HandlerTarget sink, closed by this handler after accepted records drain.
capacity:intPositive maximum number of pending records, excluding active delivery.
app:object | None, optionalApplication supplied to sink-failure observation, or None.
Returns
NoneThis method does not return a value.
Raises
ValueErrorIf capacity is not a positive integer or is a boolean.
def _observeFailure(self, error: BaseException, *, phase: str): (source)

Observe a sink failure without replacing the retained shutdown error.

Parameters
error:BaseExceptionFlush or cleanup error offered to the listener's failure runtime.
phase:strLogging operation associated with the failure.
Returns
NoneThis method does not return a value.
def close(self: Self): (source)

Stop admission, drain queued records, and close the owned sink.

Returns
NoneThis method does not return a value.
Raises
LoggingDeliveryErrorIf shutdown, flushing, or sink closure fails, chained from the first failure encountered during shutdown.
def emit(self: Self, record: logging.LogRecord): (source)

Enqueue a record snapshot without waiting for queue capacity.

Parameters
record:logging.LogRecordSource record, copied with its formatted message and reporter identity.
Returns
NoneThis method does not return a value.
Raises
LoggingDeliveryErrorIf the handler is closed or background delivery has already failed.
queue.FullIf the pending-record queue has reached its configured capacity.
def flush(self: Self): (source)

Wait for queued work, then flush the owned sink and surface failures.

Returns
NoneThis method does not return a value.
Raises
LoggingDeliveryErrorIf the sink cannot flush or a background delivery has failed.
_listener = (source)

Listener produced by _Listener.

Name of the queue receiving or storing the job.

_stopped: bool = (source)

Stopped flag used by BoundedQueueHandler.

Owned sink, closed after the queue drains.