Skip to content

Set LogFactory when a custom IMartenLogger is configured - #5823

Merged
jeremydmiller merged 1 commit into
masterfrom
stoat/nov-5-releases/marten-5761
Nov 5, 2026
Merged

jeremydmiller merged 1 commit into
masterfrom
stoat/nov-5-releases/marten-5761

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Fixes #5761

AddMarten set StoreOptions.LogFactory only in the branch that installs DefaultMartenLogger, so a custom IMartenLogger left it null and silenced the daemon, MartenDatabase etc. LogFactory is now assigned before the NulloMartenLogger check (the issue's proposed change). The custom logger still replaces session logging only.

Test: extended add_marten_by_store_options_with_custom_logger to assert LogFactory is non-null (fails before, passes after). The rest of bootstrapping_with_service_collection_extensions passes (25/25, net10.0).

Not addressed (separate requests in the issue's 'related observations'): ancillary stores, Npgsql data source logging, a public decorate-logger hook.

🤖 Generated with Claude Code

…gured (#5761)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jeremydmiller
jeremydmiller merged commit d49f791 into master Nov 5, 2026
@jeremydmiller
jeremydmiller deleted the stoat/nov-5-releases/marten-5761 branch November 5, 2026 15:29
This was referenced Nov 6, 2026
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.

A custom IMartenLogger set through AddMarten leaves StoreOptions.LogFactory null, silencing the daemon and MartenDatabase

1 participant