Skip to content

chore(logging): suppress Trace/Debug/Info in Release builds#20

Merged
nxships merged 1 commit into
mainfrom
chore/release-log-warning-floor
May 25, 2026
Merged

chore(logging): suppress Trace/Debug/Info in Release builds#20
nxships merged 1 commit into
mainfrom
chore/release-log-warning-floor

Conversation

@nxships
Copy link
Copy Markdown
Contributor

@nxships nxships commented May 25, 2026

Summary

  • PluginLogger.IsEnabled gates everything below Warning behind #if !DEBUG. Release builds now only forward Warning/Error/Critical to Dalamud's /xllog; Debug builds keep the full firehose.
  • PluginLogger is the single bridge between Microsoft.Extensions.Logging and IPluginLogSink, so this gate covers every log call regardless of category-level filter rules.

Why

Release plugins were spamming /xllog with Verbose/Debug/Info noise. We want a quieter user-facing log without losing detail during local development.

Test plan

  • Build a consuming plugin in Debug|x64/xllog still shows Verbose/Debug/Info as before.
  • Build the same plugin in Release|x64/xllog only shows Warning and above; previously noisy Info paths (e.g. EF Core Database.Command) are silent.
  • A deliberate LogWarning from app code still reaches /xllog in Release.

PluginLogger.IsEnabled now gates everything below Warning behind
!DEBUG, so Release builds only forward Warning/Error/Critical to
Dalamud's /xllog. Debug builds keep the full firehose.

The PluginLogger is the single bridge between Microsoft.Extensions.
Logging and IPluginLogSink, so gating IsEnabled is sufficient — no
M.E.L filter rules can re-open the gate from the consumer side.
@nxships nxships enabled auto-merge (squash) May 25, 2026 12:40
@nxships nxships merged commit 98c8129 into main May 25, 2026
2 checks passed
@nxships nxships deleted the chore/release-log-warning-floor branch May 25, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant