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

Release 1.0 to nuget #16

Open
adamchester opened this issue Apr 16, 2018 · 9 comments
Open

Release 1.0 to nuget #16

adamchester opened this issue Apr 16, 2018 · 9 comments

Comments

@adamchester
Copy link
Member

It's been a while...

@SimonCropp
Copy link
Contributor

is there anything outstanding to make this happen?

@nblumhardt
Copy link
Contributor

#20 would be a pretty big breaking change if we decided to do it post-1.0.

Otherwise, only #21 comes to mind.

@adamchester
Copy link
Member Author

What I had in mind:

  1. Go over the public API and quickly verify it all makes sense.
  2. Make sure we understand what's about to happen for build and deployment. For example, right now it's always adding a revision.
  3. Consider switching to plain C# types for the data model #20 and Destructuring -> Capturing #21 and Perhaps we should simplify the namespaces? #22 ?

@Leon99
Copy link

Leon99 commented Jan 25, 2022

It's been a while...

Indeed :)

Is this library abandoned, @nblumhardt?

@nblumhardt
Copy link
Contributor

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

@Leon99
Copy link

Leon99 commented Jan 27, 2022

Fare enough. Would you suggest an alternative?

@nblumhardt
Copy link
Contributor

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.

@Leon99
Copy link

Leon99 commented Feb 1, 2022

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?

@nblumhardt
Copy link
Contributor

nblumhardt commented Feb 1, 2022

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!"
}

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

No branches or pull requests

4 participants