The declarations below are transcribed from the public source and extension stubs at f5bcaa8. Ellipses mark defaults unspecified by the stub. Self denotes the same fluent builder type; _Any is the stub’s alias for typing.Any.
BasicConfig
Slotted configuration in the prospective 0.2.0 surface. Only five declared fields are supported.
class BasicConfig:
level: str | int | None = None
filename: str | None = None
stream: typ.TextIO | None = None
force: bool = False
handlers: cabc.Iterable[FemtoHandler] | None = None
basicConfig
Configure the root using level, filename, stream, force, or handlers. Output choices are mutually exclusive; stdlib format/datefmt are unsupported.
def basicConfig(config: BasicConfig, /) -> None:
...
ConfigBuilder
Prepare handler/filter references and the mandatory root configuration before initializing live logger state.
LoggerConfigBuilder
Fluent configuration for LoggerConfig. Validate options and call build before registering output.
RuntimeConfigBuilder
Apply the supported live logger mutations after validation.
class RuntimeConfigBuilder:
def __init__(self) -> None:
...
def with_filter(self, fid: str, builder: RuntimeFilterBuilder) -> Self:
...
def with_handler(self, hid: str, builder: RuntimeHandlerBuilder) -> Self:
...
def with_logger(self, lname: str, builder: LoggerMutationBuilder) -> Self:
...
def with_root_logger(self, builder: LoggerMutationBuilder) -> Self:
...
def apply(self) -> None:
...
def as_dict(self) -> dict[str, object]:
...
LoggerMutationBuilder
Describe logger level, propagation, handler, and filter mutations by identifier.
class LoggerMutationBuilder:
def __init__(self) -> None:
...
def with_level(self, level: LevelArg) -> Self:
...
def with_propagate(self, propagate: bool) -> Self:
...
def replace_handlers(self, ids: list[str]) -> Self:
...
def append_handlers(self, ids: list[str]) -> Self:
...
def remove_handlers(self, ids: list[str]) -> Self:
...
def clear_handlers(self) -> Self:
...
def replace_filters(self, ids: list[str]) -> Self:
...
def append_filters(self, ids: list[str]) -> Self:
...
def remove_filters(self, ids: list[str]) -> Self:
...
def clear_filters(self) -> Self:
...
def as_dict(self) -> dict[str, object]:
...
dictConfig
Restricted version-1 dictionary configuration. Root is required; handler filters/levels/formatters and incremental updates are unsupported.
def dictConfig(config: cabc.Mapping[str, object]) -> None:
...
fileConfig
INI configuration translated into the restricted dictConfig schema. Unsupported handler overrides and formatter sections raise ValueError.
def fileConfig(fname: str | bytes | PathLike[str] | PathLike[bytes], defaults: cabc.Mapping[str, object] | None=None, *, disable_existing_loggers: bool=True, encoding: str | None=None) -> None:
...