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

Conversation

@scop
Copy link
Contributor

commented Dec 30, 2015

No description provided.

@JonnyJD

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Owner

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

JonnyJD added a commit that referenced this pull request Dec 30, 2015

Merge branch 'scop:logging'
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 scop:logging branch Dec 30, 2015

@JonnyJD

This comment has been minimized.

Copy link
Owner

commented Dec 30, 2015

thanks

@JonnyJD JonnyJD added this to the 2.0.2 milestone May 6, 2016

@JonnyJD JonnyJD added the refactoring label 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
2 participants
You can’t perform that action at this time.