You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently errors are reported throughout the codebase with regular print statements:
print *, "Error: something happened"
While this is generally fine, a more sophisticated system that looks something like...
logger.warn("This is just a warning")
> WARNING: This is just a warning
logger.error("This is a catastrophic error")
> ERROR: This is a catastrophic error
logger.info("Just reporting regular information")
> INFO: Just reporting regular information
would allow some nice benefits:
flexible, global redirection of different types of errors to files & other output streams
uniform hierarchy of messages (e.g. error, warn, info, debug, etc)
Mainly just adding this issue to discuss whether we want this & what it could look like.
Tasks:
Integrate fypp into build system
Write logger
Migrate all existing print statements to logger
Catch future uses of print with some static analysis
The text was updated successfully, but these errors were encountered:
Something to maybe consider is whether to print regardless of rank or only on root, or atleast having the option to do so. Though this might run the risk of deadlocks, maybe a case only for the info class of messages.
JamieJQuinn
changed the title
Should there be a global logging system for better error reporting?
Design a global logging system for better error reporting?
Feb 12, 2024
JamieJQuinn
changed the title
Design a global logging system for better error reporting?
Design a global logging system for better error reporting
Feb 12, 2024
Currently errors are reported throughout the codebase with regular print statements:
While this is generally fine, a more sophisticated system that looks something like...
would allow some nice benefits:
Mainly just adding this issue to discuss whether we want this & what it could look like.
Tasks:
The text was updated successfully, but these errors were encountered: