We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently addons use print() and fstrings (e.g. f"{value}")) for logging. The motivation was to make writing addons really easy for new contributors.
This make it hard to handle logs in a useful way in drenv, for example:
We can keep logging easy by using a drenv log module, initialized when parsing addon arguments:
from drenv import addon args = addon.parse_args() addon.debug("message with value %s", 42) addon.info("message")
The output will use jsonlines:
{"time": "2024-03-31 11:24:09,869", "level": "DEBUG", "message": "message with value 42"} {"time": "2024-03-31 11:24:09,869", "level": "INFO", "message": "message"}
The addon module can install a sys.excepthook that will log errors using the same formatter.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently addons use print() and fstrings (e.g. f"{value}")) for logging. The motivation was to make writing addons really easy for new contributors.
This make it hard to handle logs in a useful way in drenv, for example:
We can keep logging easy by using a drenv log module, initialized when parsing addon arguments:
The output will use jsonlines:
The addon module can install a sys.excepthook that will log errors using the same formatter.
The text was updated successfully, but these errors were encountered: