Conversation
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)src/NLog/Targets/FileTarget.cs (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (2)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/NLog/Targets/FileTarget.cs (1)
444-444: Optional: Clarify comment example.The example is helpful, but note that
{#}tokens are processed by theArchiveFileNamesetter (lines 328-333) before this code executes. Consider rephrasing to reflect that this handles the case where ArchiveFileName has been stripped to just the extension, e.g., "After legacy {#} removal, ArchiveFileName = '.log' + ArchiveSuffixFormat = '_{0:00}' → '01.log'".
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/NLog/Targets/FileTarget.cs(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/NLog/Targets/FileTarget.cs (1)
src/NLog/Layouts/SimpleLayout.cs (5)
SimpleLayout(70-73)SimpleLayout(79-82)SimpleLayout(89-92)SimpleLayout(100-104)SimpleLayout(106-140)
🔇 Additional comments (2)
src/NLog/Targets/FileTarget.cs (2)
441-450: LGTM: Guard refines legacy ArchiveFileName handling.The additional check for non-empty
OriginalTextappropriately prevents the legacy suffix stripping logic from executing whenArchiveFileNameis effectively empty. This refinement ensures that the transformation only applies when there's meaningful legacy configuration to handle.
454-454: LGTM: Proper cache invalidation.Setting
_fileArchiveHandlerto null ensures the archive handler is recreated with the updatedArchiveSuffixFormat, consistent with other property setters in the class (lines 272, 293, 341, 359, 375).
9a5f807 to
6082187
Compare
|



See also #6063
Adjusting the legacy-repair logic after it has been disturbed by the other legacy-repair-logic where ArchiveSuffixFormat containing
{1means that legacyArchiveFileNameis automatically activated. See also #5921