-
Notifications
You must be signed in to change notification settings - Fork 197
Ship ElasticsearchJsonFormatter as a separate package #176
Comments
+1 My team is in a similar boat. Our devops infrastructure is already set up to use Logspout to send stdout and stderr from each of our containers to Elasticsearch. We just want the formatter to use in combination with the Serilog console sink to make the most of that devops effort. |
Any thoughts about this issue? I'm happy to send a PR if people are interested |
For me, it does make sense to have separate packages for the different formatters. |
Would love to have this as a standalone package as well! |
I decided to write JsonConsole which is an extension for Microsoft.Extensions.Logging which outputs json to console. It is in essence the source of Microsoft.Extensions.Logging.Console, but modified to output clean json and adjustable event names via application.json. |
Any updates or thoughts about it? Formatter is will be useful in case of deployment to k8s, where write to Console sink is enough. |
Maybe it will be great to deliver this package separately and even more: without using "Serilog" in its naming, because that nuget could be used in Console apps and another libs as well |
@mivano, I think this issue can be closed |
Check, thanks for your effort here. |
A few questions before you begin:
Does this issue relate to a new feature or an existing bug?
What version of Serilog.Sinks.Elasticsearch is affected? Please list the related NuGet package.
All versions
What is the target framework and operating system? See target frameworks & net standard matrix.
Please describe the current behavior?
If I want to use the
ElasticsearchJsonFormatter
alone, I need to install the Serilog.Sinks.ElasticSearch package, along with all related dependencies. That's a lot of dependencies just to get a formatter!As some context, I want to output Elasticsearch-compatible logs to the Console, which will be read by Fluentd and piped to Elasticsearch that way, so I don't need the whole Elasticsearch sink.
Please describe the expected behavior?
If the
ElasticsearchJsonFormatter
(and its code dependencies,DefaultJsonFormatter
etc) could be extracted to their own NuGet package, and the Sink depends on it, I could get the best of both worlds - the formatter when that's all I need, or the Sink if I need the whole lot.If that seems reasonable, I'd suggest keeping the package in this repository, and versioned in sync with the main Sink package. I'm happy to provide a PR if this sounds reasonable. Thanks!
If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem
The text was updated successfully, but these errors were encountered: