Text Logger¶
rfsoc_rfdc.txt_logger
¶
Classes¶
TxtLogger
¶
Centralized logger for text-based metrics and status logs. Manages output directories to avoid hardcoded paths across the codebase.
Source code in rfsoc_rfdc/txt_logger.py
Functions¶
log_metrics(filename, metrics_line, mode='w')
¶
Log a string of metrics to a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Name of the log file (e.g., "ch0_metrics.log") |
required |
metrics_line
|
str
|
Content to write |
required |
mode
|
File open mode ('w' for overwrite, 'a' for append) |
'w'
|