Skip to content

Conversation

@tstojecki
Copy link
Contributor

@tstojecki tstojecki commented Mar 15, 2023

Fixes #217

Changes

Changing SerilogLogMessageFormatter ctor from private to public to be able to use in config like so

configBuilder.LogMessageFormatter = typeof(SerilogLogMessageFormatter); 

Otherwise this exception is thrown at runtime
Akka.Configuration.ConfigurationException: 'LogMessageFormatter Type must have an empty constructor'

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Latest dev Benchmarks

Include data from the relevant benchmark prior to this change here.

This PR's Benchmarks

Include data from after this change here.

/// Initializes a new instance of the <see cref="SerilogLogMessageFormatter"/> class.
/// </summary>
private SerilogLogMessageFormatter()
public SerilogLogMessageFormatter()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - may as well leave the singleton there for backwards compat for now.

@Aaronontheweb Aaronontheweb merged commit 1596111 into akkadotnet:dev Mar 15, 2023
@tstojecki tstojecki deleted the serilog-formatter-public-ctor-for-config branch March 16, 2023 07:32
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.

SerilogMessageFormatter CTOR is private, can't be instantiated as the default LogMessageFormatter

2 participants