Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

propagate message templates #126

Merged

Conversation

AnthonySteele
Copy link
Contributor

@AnthonySteele AnthonySteele commented Jan 28, 2019

See #124

It needs tests It has a test

My thinking now is

  • We resisted the MessageTemplate design, because it means that you have the overhead of message string being serialised twice in two different formats.
  • However message template has caught on as a standard - it is supported by NLog, SeriLog etc.
  • it is also supported by the Microsoft.Extensions.Logging.Abstractions.ILogger abstraction, and so log messages are going to find their way into the StructuredLoggingLayoutRenderer having originated as structured, templated messages sent to an ILogger. New code in JustSaying is one example. This library should support this case.
  • With a clean slate, there are probably better ways to do things now than to use this library, but tweaks to support existing users in new scenarios are in scope. e.g. updates to JustSaying, or conversion to .NET core in an app that heavily uses NLog.StructuredLogging.Json.

This library will now work fine with ILogger and templated messages. Here's a demo: https://github.com/AnthonySteele/StructuredNLogCore

@AnthonySteele AnthonySteele added this to the Version 3.0.0 milestone Jan 28, 2019
@AnthonySteele AnthonySteele merged commit cb93c03 into justeat:master Feb 1, 2019
This was referenced Feb 1, 2019
@AnthonySteele AnthonySteele deleted the initial-impl-of-templates branch February 10, 2019 17:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant