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

${when}, support for RawValue on Inner and Else #3373

Merged
merged 2 commits into from May 6, 2019

Conversation

304NotModified
Copy link
Member

@304NotModified 304NotModified commented May 6, 2019

fixes #3139

@304NotModified 304NotModified added this to the 5.0 (new) milestone May 6, 2019
@304NotModified
Copy link
Member Author

@snakefoot I checked your comments in the other PR. Your right. I think I have proper implemented it now.

return false;
}

return Inner.TryGetRawValue(logEvent, out value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this also work:

value = null;
if (ShouldRenderInner(logEvent))
   return Inner?.TryGetRawValue(logEvent, out value) ?? false;
else
   return Else?.TryGetRawValue(logEvent, out value) ?? false;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should work, but a bit hard to read. But I see the problem of the verbose/duplicate code. Will create a helper and let's see if it's then better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS: we need a helper

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added helper. Let me know what you think

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (dev@1ceaa36). Click here to learn what that means.
The diff coverage is 78%.

@@          Coverage Diff          @@
##             dev   #3373   +/-   ##
=====================================
  Coverage       ?     81%           
=====================================
  Files          ?     344           
  Lines          ?   27607           
  Branches       ?    3713           
=====================================
  Hits           ?   22290           
  Misses         ?    4243           
  Partials       ?    1074

@304NotModified 304NotModified merged commit f1ed38d into dev May 6, 2019
@repo-ranger repo-ranger bot deleted the whenLayout-irawValue branch May 6, 2019 23:18
304NotModified added a commit that referenced this pull request May 12, 2019
* ${when}, support for RawValue on Inner and Else

* Added helper
304NotModified added a commit that referenced this pull request May 20, 2019
* ${when}, support for RawValue on Inner and Else

* Added helper
304NotModified added a commit that referenced this pull request May 28, 2019
* ${when}, support for RawValue on Inner and Else

* Added helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IRawValue - support for renderers that *could* have layouts
3 participants