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
The logging message formatting is a inconsistent. Let's do the following:
style="{"
logger.level("format {}", *arguments)
logger.level("format {}".format(*arguments))
%
{}
The text was updated successfully, but these errors were encountered:
Did you get style="{" to work? I didn't. I also worry it may break compatibility with external modules (e.g. asyncio) that use old-style formatting.
asyncio
Sorry, something went wrong.
This does not work:
import logging logger = logging.getLogger('simple_example') ch = logging.StreamHandler() formatter = logging.Formatter(style="{") ch.setFormatter(formatter) logger.addHandler(ch) logger.warn('warn message {0}', 42)
Ack. Looks broken. Then let's keep the "%" formatting for logging which then only requires changing comm_serial.py to use lazy formatting.
comm_serial.py
No branches or pull requests
The logging message formatting is a inconsistent. Let's do the following:
style="{"
should be added to https://github.com/m-labs/artiq/blob/master/artiq/tools.py#L61logger.level("format {}", *arguments)
instead oflogger.level("format {}".format(*arguments))
. The latter is always evaluated which the former is evaluated only on message emission.%
to{}
formatting.The text was updated successfully, but these errors were encountered: