Skip to main content
Control how PraisonAI logs run-time information from the CLI or your own Python scripts. The user runs an agent with verbose logging; PraisonAI emits structured lines to stderr for debugging.

Quick Start

1

CLI Users

Set LOGLEVEL=INFO (or DEBUG) before running PraisonAI commands to see more output.
2

Script Users

Call configure_cli_logging("INFO") once at app start, or wire your own logging.basicConfig().

How It Works

As of PraisonAI v?.? (PR #1867), importing praisonai.inc.models (and any other internal module) no longer calls logging.basicConfig(). Library users keep full control of their own logging configuration; only configure_cli_logging() and LOGLEVEL= (via the CLI) touch the root logger.

Configuration Options


Common Patterns

Quieting PraisonAI in a Larger App

Routing PraisonAI Logs to a File

One-off CLI Debugging


Migration note for users upgrading past PR #1561:Before this release, importing praisonai silently called logging.basicConfig and defaulted LOGLEVEL to INFO. From this release onward, only the CLI configures the root logger, and the default level is WARNING. If you embed PraisonAI in your own script and want the previous behaviour, call from praisonai._logging import configure_cli_logging; configure_cli_logging("INFO") at startup.

Best Practices

Always use get_logger("module") instead of the root logger when writing library code.
Libraries should never call logging.basicConfig() as it mutates global state. Let applications control their logging setup.
Use the environment variable for temporary debugging instead of changing code.
When customizing PraisonAI logging, attach handlers to the praisonai logger tree rather than the root logger.

Thread Safety

Thread-safe agent state and wrapper-layer improvements

Debugging

Best practices for troubleshooting PraisonAI issues