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

Better missing httpcontext reporting & Skip null-check of HttpContextAccessor.HttpContext in DoAppend #314

Merged
merged 1 commit into from Sep 19, 2018

Conversation

snakefoot
Copy link
Contributor

Has been checked

@snakefoot
Copy link
Contributor Author

It would actually be really nice if it didn't have to allocate / unwrap the HttpContextWrapper two times in AspNetLayoutRendererBase.

It performs a nullcheck and then the specialized version has to allocate / unwrap the HttpContextWrapper again.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 1%.
The diff coverage is 60%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +1%     
=====================================
  Files          31     31           
  Lines         399    413   +14     
  Branches       95     89    -6     
=====================================
+ Hits          233    246   +13     
- Misses        128    136    +8     
+ Partials       38     31    -7
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...ayoutRenderers/AspNetRequestValueLayoutRenderer.cs 92% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...8de37e5. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 1%.
The diff coverage is 60%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +1%     
=====================================
  Files          31     31           
  Lines         399    413   +14     
  Branches       95     89    -6     
=====================================
+ Hits          233    246   +13     
- Misses        128    136    +8     
+ Partials       38     31    -7
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...ayoutRenderers/AspNetRequestValueLayoutRenderer.cs 92% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...ffa332e. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 1%.
The diff coverage is 62%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +1%     
=====================================
  Files          31     31           
  Lines         399    414   +15     
  Branches       95     89    -6     
=====================================
+ Hits          233    247   +14     
- Misses        128    136    +8     
+ Partials       38     31    -7
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...ayoutRenderers/AspNetRequestValueLayoutRenderer.cs 92% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...ffa332e. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 1%.
The diff coverage is 62%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +1%     
=====================================
  Files          31     31           
  Lines         399    414   +15     
  Branches       95     89    -6     
=====================================
+ Hits          233    247   +14     
- Misses        128    136    +8     
+ Partials       38     31    -7
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...ayoutRenderers/AspNetRequestValueLayoutRenderer.cs 92% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...ffa332e. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 63%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    414   +15     
  Branches       95     88    -7     
=====================================
+ Hits          233    248   +15     
- Misses        128    136    +8     
+ Partials       38     30    -8
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...ayoutRenderers/AspNetRequestValueLayoutRenderer.cs 95% <100%> (+3%) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...ffa332e. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 63%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    414   +15     
  Branches       95     88    -7     
=====================================
+ Hits          233    248   +15     
- Misses        128    136    +8     
+ Partials       38     30    -8
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...ayoutRenderers/AspNetRequestValueLayoutRenderer.cs 95% <100%> (+3%) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...ffa332e. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 63%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    414   +15     
  Branches       95     88    -7     
=====================================
+ Hits          233    248   +15     
- Misses        128    136    +8     
+ Partials       38     30    -8
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...ayoutRenderers/AspNetRequestValueLayoutRenderer.cs 95% <100%> (+3%) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...885c38b. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 63%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    414   +15     
  Branches       95     88    -7     
=====================================
+ Hits          233    248   +15     
- Misses        128    136    +8     
+ Partials       38     30    -8
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...ayoutRenderers/AspNetRequestValueLayoutRenderer.cs 95% <100%> (+3%) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...885c38b. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 63%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    414   +15     
  Branches       95     88    -7     
=====================================
+ Hits          233    248   +15     
- Misses        128    136    +8     
+ Partials       38     30    -8
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...ayoutRenderers/AspNetRequestValueLayoutRenderer.cs 95% <100%> (+3%) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...7c6d88e. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 63%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    414   +15     
  Branches       95     88    -7     
=====================================
+ Hits          233    248   +15     
- Misses        128    136    +8     
+ Partials       38     30    -8
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...7c6d88e. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 63%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    414   +15     
  Branches       95     88    -7     
=====================================
+ Hits          233    248   +15     
- Misses        128    136    +8     
+ Partials       38     30    -8
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...tRenderers/AspNetApplicationValueLayoutRenderer.cs 100% <100%> (+25%) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...7c6d88e. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 1%.
The diff coverage is 62%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +1%     
=====================================
  Files          31     31           
  Lines         399    416   +17     
  Branches       95     89    -6     
=====================================
+ Hits          233    248   +15     
- Misses        128    137    +9     
+ Partials       38     31    -7
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...e/LayoutRenderers/AspNetRequestReferrerRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...7c6d88e. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 1%.
The diff coverage is 62%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +1%     
=====================================
  Files          31     31           
  Lines         399    416   +17     
  Branches       95     89    -6     
=====================================
+ Hits          233    248   +15     
- Misses        128    137    +9     
+ Partials       38     31    -7
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...e/LayoutRenderers/AspNetRequestReferrerRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...7c6d88e. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 1%.
The diff coverage is 62%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +1%     
=====================================
  Files          31     31           
  Lines         399    416   +17     
  Branches       95     89    -6     
=====================================
+ Hits          233    248   +15     
- Misses        128    137    +9     
+ Partials       38     31    -7
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...e/LayoutRenderers/AspNetRequestReferrerRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...a7df74a. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 1%.
The diff coverage is 62%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +1%     
=====================================
  Files          31     31           
  Lines         399    416   +17     
  Branches       95     89    -6     
=====================================
+ Hits          233    248   +15     
- Misses        128    137    +9     
+ Partials       38     31    -7
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...e/LayoutRenderers/AspNetRequestReferrerRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...86b0be4. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 1%.
The diff coverage is 62%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +1%     
=====================================
  Files          31     31           
  Lines         399    416   +17     
  Branches       95     89    -6     
=====================================
+ Hits          233    248   +15     
- Misses        128    137    +9     
+ Partials       38     31    -7
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...e/LayoutRenderers/AspNetRequestReferrerRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...5e3ed80. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 65%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    422   +23     
  Branches       95     90    -5     
=====================================
+ Hits          233    253   +20     
- Misses        128    137    +9     
+ Partials       38     32    -6
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...e/LayoutRenderers/AspNetRequestReferrerRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...5e3ed80. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 65%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    422   +23     
  Branches       95     90    -5     
=====================================
+ Hits          233    253   +20     
- Misses        128    137    +9     
+ Partials       38     32    -6
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...e/LayoutRenderers/AspNetRequestReferrerRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...5e3ed80. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 2%.
The diff coverage is 66%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    60%   +2%     
=====================================
  Files          31     31           
  Lines         399    426   +27     
  Branches       95     91    -4     
=====================================
+ Hits          233    256   +23     
- Misses        128    137    +9     
+ Partials       38     33    -5
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...e/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 86% <100%> (ø) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 63% <50%> (+5%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 57% <50%> (+7%) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 83% <50%> (+1%) ⬆️
...e/LayoutRenderers/AspNetRequestReferrerRenderer.cs 57% <50%> (+7%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...5e3ed80. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #314 into master will increase coverage by 3%.
The diff coverage is 72%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
+ Coverage      58%    61%   +3%     
=====================================
  Files          31     31           
  Lines         399    419   +20     
  Branches       95     90    -5     
=====================================
+ Hits          233    256   +23     
- Misses        128    130    +2     
+ Partials       38     33    -5
Impacted Files Coverage Δ
...e/LayoutRenderers/AspNetRequestIpLayoutRenderer.cs 0% <ø> (ø) ⬆️
...LayoutRenderers/AspNetRequestHostLayoutRenderer.cs 0% <0%> (ø) ⬆️
...nderers/AspNetUserIsAuthenticatedLayoutRenderer.cs 0% <0%> (ø) ⬆️
...enderers/AspNetRequestQueryStringLayoutRenderer.cs 78% <100%> (+4%) ⬆️
...pNetCore/LayoutRenderers/AspNetRequestuseragent.cs 71% <100%> (+14%) ⬆️
...LayoutRenderers/AspNetRequestHttpMethodRenderer.cs 67% <100%> (+17%) ⬆️
...e/LayoutRenderers/AspNetSessionIdLayoutRenderer.cs 83% <100%> (+3%) ⬆️
NLog.Web.AspNetCore/DefaultHttpContextAccessor.cs 100% <100%> (ø) ⬆️
...etCore/LayoutRenderers/AspNetRequestUrlRenderer.cs 86% <100%> (+5%) ⬆️
...youtRenderers/AspNetRequestCookieLayoutRenderer.cs 88% <100%> (+4%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0282...aede302. Read the comment docs.

if (httpRequest == null)
{
Common.InternalLogger.Debug("aspnet-request-querystring - HttpContext Request is null");
Copy link
Member

Choose a reason for hiding this comment

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

this is now heavily duplicated. Can't be do this in the base class?

Copy link
Contributor Author

@snakefoot snakefoot Sep 19, 2018

Choose a reason for hiding this comment

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

I guess it should be possible. But I actually like to write the name of the layout-renderer. So the message is not the same. But I would also like that one only had one debug-alert for a single logevent. Right now one will get a debug-message for every triggered layout-renderer. The same problem with duplicate internal-logmessage happens when no active httpcontext.

Copy link
Member

Choose a reason for hiding this comment

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

I can live with the duplicate message, but not really with the duplicate code ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would it be okay if I just remove the debug-messages then. Because I find it difficult to modify these layoutrenderers without it being breaking interface changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And they are gone :)

@304NotModified
Copy link
Member

304NotModified commented Sep 19, 2018

What happend - codecov report DDOS?

@snakefoot
Copy link
Contributor Author

snakefoot commented Sep 19, 2018

What happend - codecov report DDOS?

No idea. Maybe it was super sensitive while I was working on this PR :)

Copy link
Member

@304NotModified 304NotModified left a comment

Choose a reason for hiding this comment

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

Thanks!

@304NotModified 304NotModified changed the title Skip null-check of HttpContextAccessor.HttpContext in DoAppend Better missing httpcontext reporting & Skip null-check of HttpContextAccessor.HttpContext in DoAppend Sep 19, 2018
@304NotModified 304NotModified merged commit c928e2b into NLog:master Sep 19, 2018
@snakefoot snakefoot added ASP.NET Core ASP.NET Core - all versions and removed ASP.NET Core 1 labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASP.NET Core ASP.NET Core - all versions ASP.NET 4 ASP.NET MVC Classic enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants