Skip to content

Conversation

sungam3r
Copy link
Contributor

No description provided.

@@ -18,6 +18,8 @@ class SafeAggregateSink : ILogEventSink
{
readonly ILogEventSink[] _sinks;

internal static SafeAggregateSink Empty = new(new ILogEventSink[0]);
Copy link
Member

Choose a reason for hiding this comment

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

This appears to be unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sink ??= SafeAggregateSink.Empty; in another file.

@nblumhardt
Copy link
Member

In the majority of applications, where there are a nonzero number of sinks, wouldn't this just lead to an additional/wasted/long-lived instance of SafeAggregateSink and an empty array?

@sungam3r
Copy link
Contributor Author

I removed field.

@nblumhardt nblumhardt merged commit 19d8b1a into serilog:dev Mar 13, 2023
@nblumhardt
Copy link
Member

LGTM! 👍

@sungam3r sungam3r deleted the sink branch March 13, 2023 07:23
@nblumhardt nblumhardt mentioned this pull request Jun 19, 2023
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.

3 participants