Skip to content
New issue

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

Let logging format messages on demand #107

Merged
merged 1 commit into from
Dec 30, 2015
Merged

Let logging format messages on demand #107

merged 1 commit into from
Dec 30, 2015

Conversation

scop
Copy link
Contributor

@scop scop commented Dec 30, 2015

No description provided.

@JonnyJD
Copy link
Owner

JonnyJD commented Dec 30, 2015

Would you please elaborate a bit on the problem and your solution? I only see a syntax change from what is suggested in Python 3 and what is naturally used in Python 2.

@scop
Copy link
Contributor Author

scop commented Dec 30, 2015

I don't think you're reading the change quite right. This is not about formatting style. With this change, log messages that don't end up being logged don't need to be formatted at all. (Probably next to non-issue with isrcsubmit, but...)

@JonnyJD
Copy link
Owner

JonnyJD commented Dec 30, 2015

Oh, so you want to optimize string handling for short strings in an interactive script? :-D

I never considered that difference, because that is not at all relevant for the performance of any of my scripts (including isrcsubmit).

I might consider it for "style reasons" though. That way it is already a good example if a snipped like that will ever become "critical".

@JonnyJD JonnyJD merged commit 96e3e09 into JonnyJD:master Dec 30, 2015
JonnyJD added a commit that referenced this pull request Dec 30, 2015
see pull request #107

String formatting only done when message is actually logged.
This is not at all performance critical here,
but better "style" in general.
@scop scop deleted the logging branch December 30, 2015 20:19
@JonnyJD
Copy link
Owner

JonnyJD commented Dec 30, 2015

thanks

@JonnyJD JonnyJD added this to the 2.0.2 milestone May 6, 2016
@JonnyJD JonnyJD modified the milestones: 2.0.2, 2.1.0 Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants