GithubHelp home page GithubHelp logo

Comments (6)

nblumhardt avatar nblumhardt commented on June 3, 2024

Thanks for the report. Have you enabled and checked SelfLog for messages?

from serilog-sinks-elasticsearch.

tanveer-ali avatar tanveer-ali commented on June 3, 2024

Yes I have not tried SelfLog in the start method of service like this:
var file = File.CreateText(@"c:\logs\serilog-errors.txt");
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));

But it's empty, there are no errors, and nothing is written into it.

from serilog-sinks-elasticsearch.

nblumhardt avatar nblumhardt commented on June 3, 2024

Hmm, okay, thanks for the additional info. It may need investigation by someone familiar with Elasticsearch (just helping to maintain the repo here :-))

from serilog-sinks-elasticsearch.

Moulde avatar Moulde commented on June 3, 2024

I'm not familiar with the "serilog:write-to:Elasticsearch.nodeUris" setting, so i dont know if this applies to it, but when configuring the sink fluently in code, if you want to log to multiple elasticsearch instances, you need to add multiple sinks, instead of multiple endpoints to the same sinks.
If you just add multiple endpoints, it seems it will do round robin routing of the log events.

from serilog-sinks-elasticsearch.

mivano avatar mivano commented on June 3, 2024

That is correct. The ES sink uses the connection pool functionality. So normally you pass in a couple of endpoints and the client is clever enough to check health and connect to the available one.

If you want to send to multiple ES clusters, then you need to add multiple sinks. Or rethink your strategy; maybe write to a file and use logstash to output it to different clusters.

from serilog-sinks-elasticsearch.

tanveer-ali avatar tanveer-ali commented on June 3, 2024

Thanks for the information. I think I can work with single sink at the moment and if multiple sinks are needed, I can use multiple sinks.

from serilog-sinks-elasticsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.