Logging configuration for metahq-build.
Provides structured logging with multiple handlers for console and file output. Supports different log levels and formatting options.
PipelineLogger
¶
Specialized logger for pipeline execution with stage tracking.
Provides methods for logging pipeline-specific events like stage transitions, progress updates, and data statistics.
| Attributes: |
|
|---|
Examples:
>>> pipeline_logger = PipelineLogger("metahq_build.pipeline")
>>> pipeline_logger.start_stage("fetch_metadata")
>>> pipeline_logger.log_stat("Fetched samples", 1500)
>>> pipeline_logger.end_stage("fetch_metadata")
start_stage(stage_name)
¶
Log the start of a pipeline stage.
| Parameters: |
|
|---|
end_stage(stage_name)
¶
Log the completion of a pipeline stage.
| Parameters: |
|
|---|
log_stat(description, value)
¶
Log a statistic with description and value.
| Parameters: |
|
|---|
log_progress(message)
¶
Log a progress message within a stage.
| Parameters: |
|
|---|
log_error(message, exc_info=False)
¶
Log an error message.
| Parameters: |
|
|---|
log_warning(message)
¶
Log a warning message.
| Parameters: |
|
|---|
log_debug(message)
¶
Log a debug message.
| Parameters: |
|
|---|
setup_logger(name, level=logging.INFO, log_file=None, use_rich=True)
¶
Configure and return a logger with console and optional file handlers.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Examples:
get_default_log_file(package_root)
¶
Get default log file path for the package.
| Parameters: |
|
|---|
| Returns: |
|
|---|