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
Conversation
1ffaf36
to
2dfe3b6
Compare
@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); |
There was a problem hiding this comment.
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;
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 Report
@@ Coverage Diff @@
## dev #3373 +/- ##
=====================================
Coverage ? 81%
=====================================
Files ? 344
Lines ? 27607
Branches ? 3713
=====================================
Hits ? 22290
Misses ? 4243
Partials ? 1074 |
* ${when}, support for RawValue on Inner and Else * Added helper
* ${when}, support for RawValue on Inner and Else * Added helper
* ${when}, support for RawValue on Inner and Else * Added helper
fixes #3139