anuga.utilities.log.file_only
- anuga.utilities.log.file_only()[source]
Context manager: send all print() output to the log file only.
Terminal output is suppressed for the duration of the block. Requires set_logfile() to have been called first; if no logfile is active, output is suppressed entirely.
Typical use — capture verbose internal output without cluttering the terminal:
with log.file_only(): anuga.create_pmesh_from_regions(..., verbose=True, ...)