Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Ship ElasticsearchJsonFormatter as a separate package #176

Closed
6 of 7 tasks
andrewlock opened this issue May 17, 2018 · 9 comments
Closed
6 of 7 tasks

Ship ElasticsearchJsonFormatter as a separate package #176

andrewlock opened this issue May 17, 2018 · 9 comments

Comments

@andrewlock
Copy link

A few questions before you begin:

Is this an issue related to the Serilog core project or one of the sinks or
community projects.
This issue list is intended for Serilog Elasticsearch Sink issues. If this issue relates to another sink or to the code project,
please log on the related repository. Please use Gitter chat and Stack Overflow for discussions and questons.

Does this issue relate to a new feature or an existing bug?

  • Bug
  • New Feature

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.

  • netCore 2.0
  • netCore 1.0
  • 4.7
  • 4.6.x
  • 4.5.x

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

@ActualAdam
Copy link

+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.

@andrewlock
Copy link
Author

Any thoughts about this issue? I'm happy to send a PR if people are interested

@mivano
Copy link
Contributor

mivano commented Aug 20, 2018

For me, it does make sense to have separate packages for the different formatters.

@nvoskuilen
Copy link

Would love to have this as a standalone package as well!

@nvoskuilen
Copy link

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.

@vhatsura
Copy link

Any updates or thoughts about it? Formatter is will be useful in case of deployment to k8s, where write to Console sink is enough.

@reeloadead
Copy link

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

@vhatsura
Copy link

@mivano, I think this issue can be closed

@mivano
Copy link
Contributor

mivano commented Mar 15, 2019

Check, thanks for your effort here.

@mivano mivano closed this as completed Mar 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants