Skip to content

FileTarget - Improve repair of legacy ArchiveFileName#6110

Merged
snakefoot merged 1 commit into
NLog:devfrom
snakefoot:FileTargetArchiveFileNameFix
Mar 3, 2026
Merged

FileTarget - Improve repair of legacy ArchiveFileName#6110
snakefoot merged 1 commit into
NLog:devfrom
snakefoot:FileTargetArchiveFileNameFix

Conversation

@snakefoot
Copy link
Copy Markdown
Contributor

No description provided.

@snakefoot snakefoot added enhancement Improvement on existing feature file-target file-archiving Issues with archiving with the file target labels Mar 3, 2026
@snakefoot snakefoot changed the title FileTarget - Improve repair legacy ArchiveFileName FileTarget - Improve repair of legacy ArchiveFileName Mar 3, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 3, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 00d418e and ead2592.

📒 Files selected for processing (1)
  • src/NLog/Targets/FileTarget.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/NLog/Targets/FileTarget.cs

Walkthrough

Updated fallback selection in FileTarget: the ArchiveFileName setter now uses the local archiveSuffixFormat (with fallback to _legacySequenceArchiveSuffixFormat) when # markers are present; the ArchiveSuffixFormat property now prefers _archiveSuffixFormat and falls back to _legacyDateArchiveSuffixFormat for date-based cases. (≤50 words)

Changes

Cohort / File(s) Summary
Archive suffix fallback behavior
src/NLog/Targets/FileTarget.cs
Modified ArchiveFileName setter to use the local archiveSuffixFormat with fallback to _legacySequenceArchiveSuffixFormat when handling # markers (replacing prior use of _archiveSuffixFormat). Adjusted ArchiveSuffixFormat property to return _archiveSuffixFormat ?? _legacyDateArchiveSuffixFormat for date-based defaults.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble at suffixes, hop through code,
Local wins first on the archive road,
Legacy hums a softer tune,
Files march under a silver moon. 🐇✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the purpose and context of the legacy ArchiveFileName repair improvements.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: improving repair logic for legacy ArchiveFileName in FileTarget.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@snakefoot snakefoot force-pushed the FileTargetArchiveFileNameFix branch 3 times, most recently from 92bb0a4 to 00d418e Compare March 3, 2026 01:51
@snakefoot snakefoot force-pushed the FileTargetArchiveFileNameFix branch 2 times, most recently from 3fb8bca to ead2592 Compare March 3, 2026 01:54
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 3, 2026

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 3, 2026

This was referenced Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement on existing feature file-archiving Issues with archiving with the file target file-target size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant