Skip to content

Conversation

julik
Copy link
Contributor

@julik julik commented Mar 1, 2018

When blocks are used, and the set logging
level of the Logger object is above that of
the call, the block will not be executed.

This prevents string allocations in log
messages that would not be retained anyway,
which can be especially significant when
calling inspect on large-ish objects.

For rationale, see http://hawkins.io/2013/08/using-the-ruby-logger/
and https://stackoverflow.com/questions/30144317

When blocks are used, and the set logging
level of the Logger object is above that of
the call, the block will not be executed.

This prevents string allocations in log
messages that would not be retained anyway,
which can be especially significant when
calling `inspect` on large-ish objects.

For rationale, see http://hawkins.io/2013/08/using-the-ruby-logger/
and https://stackoverflow.com/questions/30144317
@julik julik requested a review from ashanbrown as a code owner March 1, 2018 23:08
@eli-darkly eli-darkly self-requested a review March 2, 2018 21:24
@eli-darkly
Copy link
Contributor

Looks good, and works fine in tests. Thanks!

@eli-darkly eli-darkly merged commit 7fa5e28 into launchdarkly:master Mar 3, 2018
eli-darkly added a commit that referenced this pull request Jan 18, 2019
add YARD config so our docs show up correctly everywhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants