Skip to content

Add a flag when logging to skip string template calculations in release - #2127

Merged
PanayotCankov merged 1 commit into
masterfrom
cankov/checked-logging
May 19, 2016
Merged

PanayotCankov merged 1 commit into
masterfrom
cankov/checked-logging

Conversation

@PanayotCankov

Copy link
Copy Markdown
Contributor

When logging non errors wrap guard them:

if (tracer.enabled) {
    tracer.write("some " + heavy + "calculations", nonErrorCategory);
}

Even if the tracer is disabled, the arguments will be calculated, sometimes calling heavy toString() implementations.

The guard is supposed to provide the most efficient way to skip any tracing overhead when running in release.

@ns-bot ns-bot added cla: yes and removed cla: no labels May 17, 2016
@PanayotCankov PanayotCankov changed the title Add a flag we can use to skip string template calculations in release Add a flag when logging to skip string template calculations in release May 17, 2016
@PanayotCankov
PanayotCankov force-pushed the cankov/checked-logging branch from 4bdc428 to eda2603 Compare May 17, 2016 13:44
@dtopuzov

Copy link
Copy Markdown
Contributor

run ci

@PanayotCankov PanayotCankov reopened this May 19, 2016
@PanayotCankov
PanayotCankov merged commit df1d322 into master May 19, 2016
@PanayotCankov
PanayotCankov deleted the cankov/checked-logging branch May 19, 2016 12:52
@lock

lock Bot commented Aug 28, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants