Skip to content

Determine next log file number from directory on first run - #41492

Merged
wtgodbe merged 1 commit into
dotnet:release/6.0from
dustinsoftware:pr-41375-backport
May 5, 2022
Merged

wtgodbe merged 1 commit into
dotnet:release/6.0from
dustinsoftware:pr-41375-backport

Conversation

@dustinsoftware

@dustinsoftware dustinsoftware commented May 3, 2022 •

Copy link
Copy Markdown
Contributor

Determine next log file number from directory on first run

Backport of #41375 to 6.0

Restores file logging behavior after the app restarts multiple times in a single day.

Description

Fixes #41326

Customer Impact

Without this patch, an app that restarts multiple times per day (due to CI or app crashes) will stop logging w3c logs until the next day.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

This code is called on every web request, but the logic to determine the first filename only runs once per app start, and has guards when parsing the highest log number from the existing files on disk.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@ghost ghost added area-runtime community-contribution Indicates that the PR has been added by a community member labels May 3, 2022
@ghost ghost added this to the 6.0.x milestone May 3, 2022
@ghost

ghost commented May 3, 2022

Copy link
Copy Markdown

Hi @dustinsoftware. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@adityamandaleeka adityamandaleeka added the Servicing-consider Shiproom approval is required for the issue label May 4, 2022
@ghost

ghost commented May 4, 2022

Copy link
Copy Markdown

Hi @dustinsoftware. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@rbhanda rbhanda modified the milestones: 6.0.x, 6.0.6 May 5, 2022
@rbhanda rbhanda added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels May 5, 2022
@dougbu

dougbu commented May 5, 2022

Copy link
Copy Markdown
Contributor

/ping reviewers (so that it makes it into 6.0.6)

@wtgodbe
wtgodbe merged commit a29515e into dotnet:release/6.0 May 5, 2022
@dustinsoftware
dustinsoftware deleted the pr-41375-backport branch May 6, 2022 18:55
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares community-contribution Indicates that the PR has been added by a community member Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants