Skip to content

Conversation

@snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Oct 1, 2025

NLog v6 have become more noisy, lets improve:

2025-09-30 12:02:06.8120 Info Registered target NLog.Targets.FileTarget(Name=logfile)
2025-09-30 12:02:06.8292 Info NLog, Version=6.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 6.0.4.4534. Product version: 6.0.4+0f63723442db07c29eb838b0bce8b5633031a04e. GlobalAssemblyCache: False
2025-09-30 12:02:06.8292 Info AutoReload Config File Monitor starting
2025-09-30 12:02:06.8551 Info Configuration initialized.
2025-09-30 12:06:14.3522 Info AppDomain Shutting down. LogFactory closing...
2025-09-30 12:06:14.3522 Info AutoReload Config File Monitor stopping, since no active configuration
2025-09-30 12:06:14.3635 Info LogFactory has been disposed.

@coderabbitai
Copy link

coderabbitai bot commented Oct 1, 2025

Warning

Rate limit exceeded

@snakefoot has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 52 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 4033518 and b793aaa.

📒 Files selected for processing (2)
  • src/NLog/Config/XmlLoggingConfiguration.cs (3 hunks)
  • src/NLog/LogFactory.cs (1 hunks)

Walkthrough

Downgraded two InternalLogger.Info calls to Debug in XmlLoggingConfiguration.OnConfigurationAssigned, augmented XmlLoggingConfiguration.ToString() to include "AutoReload=true" when enabled, and changed LogFactory.ActivateLoggingConfiguration log to include the configuration object. No control-flow or public API changes.

Changes

Cohort / File(s) Change Summary
XmlLoggingConfiguration adjustments
src/NLog/Config/XmlLoggingConfiguration.cs
Two InternalLogger.Info calls in OnConfigurationAssigned changed to Debug; ToString() now conditionally includes AutoReload=true before the FilePath segment when auto-reload is enabled. Logic and lifetimes unchanged.
LogFactory message formatting
src/NLog/LogFactory.cs
ActivateLoggingConfiguration log changed from a static "Configuration initialized." to "Configuration initialized: {0}" with the config object passed as a parameter. No control-flow or error-handling changes.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my nose, a softer log I hum,
From Info down to Debug I come.
AutoReload whispers its name in the trace,
A config joins the line—quieter, in place.
A rabbit's nod for tiny, tidy change.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately describes the primary change to the XmlLoggingConfiguration by reducing InternalLogger Info-level output, clearly reflecting the main intent of the pull request.
Description Check ✅ Passed This description clearly relates to the proposed changes by illustrating the noisy Info-level log output in NLog v6 and the intent to reduce it, matching the modifications in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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 enabled auto-merge (squash) October 1, 2025 17:45
@snakefoot snakefoot force-pushed the Configuration_initialized branch from 533f2c8 to c15a76e Compare October 1, 2025 17:59
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Oct 1, 2025
@snakefoot snakefoot force-pushed the Configuration_initialized branch from c15a76e to 4033518 Compare October 1, 2025 18:00
@snakefoot snakefoot force-pushed the Configuration_initialized branch from 4033518 to b793aaa Compare October 1, 2025 18:04
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 1, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
60.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@snakefoot snakefoot merged commit 809ef9c into NLog:dev Oct 1, 2025
5 of 6 checks passed
@snakefoot snakefoot added this to the 6.0.5 milestone Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant