Release 1.0 to nuget
adamchester opened this issue ยท 9 comments
It's been a while...
is there anything outstanding to make this happen?
What I had in mind:
- Go over the public API and quickly verify it all makes sense.
- Make sure we understand what's about to happen for build and deployment. For example, right now it's always adding a revision.
- #20 and #21 and #22 ?
Hi @Leon99 ๐ ; I don't think this library ended up with a lot of adoption. It might make sense to archive. I'll do that tomorrow, if no one jumps in in the meantime
Fare enough. Would you suggest an alternative?
Depends on your needs, @Leon99 - the MessageTemplateParser
in Serilog is useful for simple ad-hoc use cases. For longer-term projects, forking and adapting one of the existing parsers (from MEL, Serilog, NLog, etc.) would be my bet.
Also open to reviving this project, but I think quite a lot of work will be required to get it to where we'd like.
Let's say I have a simple ad-hoc use case that I achieve with MessageTemplate.Format(message, args)
. What would be the Serilog way? Something like https://stackoverflow.com/a/35855499/8342076?
Definitely an option ๐
Another is to create a logger with something like var logger = new LoggerConfiguration().CreateLogger()
, and then use BindMessageTemplate
:
if (logger.BindMessageTemplate("Hello, {Name}!", new[] { "World" }, out var template, out var properties)
{
var propsByName = properties.ToDictionary(p => p.Name, p => p.Value);
Console.WriteLine(template.Render(propsByName, null));
// -> "Hello, World!"
}