Text Logger Backend#
The text backend is the default OpenFactory logging backend.
It writes human-readable log messages to the standard output.
Example output:
[APP] (2026-07-16 14:32:18) INFO Application started
The text backend is primarily intended for local development and interactive use.
Configuration#
The text backend is selected by setting the following environment variable:
OPENFACTORY_LOG_BACKEND=text
Human-readable log files#
By default, log messages are written only to the standard output.
The OPENFACTORY_TEXT_LOG_DIRECTORY environment variable is ignored by this backend because
the primary output is already human-readable. If file-based logging is required,
standard operating system or container logging facilities should be used.
API Reference#
- class openfactory.logging.backends.text.TextLoggerBackend[source]#
Bases:
objectLogging backend for human-readable text logs.
- static configure(logger, level, prefix, text_log_directory)[source]#
Configure a logger for the text logging backend.
- Return type:
- Parameters:
logger (logging.Logger) – Logger to configure.
level (int) – Logging level.
prefix (str) – Prefix prepended to log messages.
text_log_directory (str | None) – Directory where human-readable log files are written. Currently unused.