Structured Logging

Configure console/file logging via the centralized config CLI, and use structured log helpers in code.

Configure with the CLI

# Show current config (including logging)
abstractcore --status

# Console verbosity
abstractcore --set-console-log-level DEBUG
abstractcore --set-console-log-level INFO
abstractcore --set-console-log-level WARNING
abstractcore --set-console-log-level ERROR
abstractcore --set-console-log-level NONE

# File logging (disabled by default)
abstractcore --enable-file-logging
abstractcore --disable-file-logging
abstractcore --set-log-base-dir ~/.abstractcore/logs

# Convenience
abstractcore --enable-debug-logging
abstractcore --disable-console-logging

Logging defaults live in ~/.abstractcore/config/abstractcore.json. See Centralized Configuration for the schema.

Verbatim capture (prompts/responses)

Some components can capture full prompts and responses in logs/traces. This is controlled by verbatim_enabled in the centralized config file (~/.abstractcore/config/abstractcore.json). Disable it if you may handle sensitive data.

In-code usage

from abstractcore.utils.structured_logging import get_logger

logger = get_logger(__name__)
logger.info("startup", component="my_app", version="1.0.0")

Related Documentation

Centralized Configuration

Defaults, keys, and logging schema

Troubleshooting

Debug common issues

FAQ

Logging, tracing, and downloads

Events

Subscribe to runtime events for observability