Skip to content

Commit

Permalink
nlog: loggin health not 200 status code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeybannov committed Jan 29, 2025
1 parent 9967c62 commit 4425a93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/nlog.config
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
<logger name="ASC*" minlevel="Debug" writeTo="web">
<filters defaultAction="Log">
<when condition="contains('${logger}', 'ASC.SQL')" action="Ignore" />
<when condition="regex-matches('${scope-property:RequestPath}', '^/health/?$', 'ignorecase,singleline')" action="Ignore" />
<when condition="regex-matches('${scope-property:RequestPath}', '^/health/?$', 'ignorecase,singleline') and equals('${aspnet-response-statuscode}','200')" action="Ignore" />
</filters>
</logger>
<logger name="Microsoft.AspNetCore.Hosting.Diagnostics" minlevel="Debug" writeTo="ownFile-web" final="true">
<filters defaultAction="Log">
<when condition="regex-matches('${scope-property:RequestPath}', '^/health/?$', 'ignorecase,singleline')" action="Ignore" />
<when condition="regex-matches('${scope-property:RequestPath}', '^/health/?$', 'ignorecase,singleline') and equals('${aspnet-response-statuscode}','200')" action="Ignore" />
</filters>
</logger>
<logger name="Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware" maxlevel="Information" writeTo="ownFile-web" final="true" />
Expand Down

0 comments on commit 4425a93

Please sign in to comment.