Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Simplify serialization path #54

Closed
codebrain opened this issue Mar 2, 2020 · 2 comments
Closed

[FEATURE] Simplify serialization path #54

codebrain opened this issue Mar 2, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@codebrain
Copy link
Contributor

Since it is not possible to serialize directly into the StringBuilder, then you can simplify this method:

		protected override void RenderFormattedMessage(LogEventInfo logEventInfo, StringBuilder target)
                {
                        // blah blah
			var output = ecsEvent.Serialize();
                        target.Append(output);
                }

Into this:

		protected override string GetFormattedMessage(LogEventInfo logEvent)
		{
                        // blah blah
			var output = ecsEvent.Serialize();
                        return output;
		}

And remove the existing GetFormattedMessage

@codebrain codebrain added the enhancement New feature or request label Mar 2, 2020
@codebrain codebrain self-assigned this Mar 2, 2020
@codebrain codebrain changed the title [FEATURE] Nlog cleanup [FEATURE] Simplify serialization path Mar 5, 2020
@snakefoot
Copy link
Contributor

snakefoot commented May 8, 2020

@codebrain I think this issue should be closed. I'm creating a PR that will make better use of the StringBuilder. See also #75

@russcam
Copy link
Contributor

russcam commented May 28, 2021

Thanks @snakefoot, closing this.

@russcam russcam closed this as completed May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants