-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Is your feature request related to a problem?
-
cmorlogger messages are printed in the console during ane3sm_to_cmiprun. However, they are not captured in the log file. We won't know ifcmoris an issue when assessing a stack-trace in a log file, which can be an issue during debugging.Per ChatGPT:
To capture all warnings and errors from the
cmormodule into the Python logger, you need to redirect thecmormodule's logging output to Python's logging system. **Thecmormodule uses its own loggingUse CMOR's logfile Parameter:
Set the logfile parameter in
cmor.setup()to a specific file. This ensures that CMOR logs are written to a file without interfering with stdout or stderr. You can then use Python's logging system to monitor or process this log file if needed.import cmor cmor.setup( inpath="path/to/tables", netcdf_file_action=cmor.CMOR_REPLACE, logfile="cmor.log" # Logs will be written to this file )
-
Lack of error-reporting to log-files when cmorizing exists prematurely
- Perhaps cmor itself is responsible for lack of error messages
- Perhaps cmor fails to return a “fail status” (so that E2C can tell something went wrong)
Describe the solution you'd like
Describe alternatives you've considered
We capture logs for cmor per variable, but not the actual cmor module logs (e.g., cmor.axis error)
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status