Code Monkey home page Code Monkey logo

Comments (10)

rwynn avatar rwynn commented on August 17, 2024

I thought about having the ability to send the logs to Elasticsearch just like there is an option to send stats to Elasticsearch. I might implement that at some point.

The verbose option is mainly there so that you can debug/verify the trace log of bulk requests to Elasticsearch. It might be a lot of data depending on the size of your documents. I would not enable this option in production.

I haven't noticed verbose slowing things down dramatically. Are you logging to files or just to Stdout?

from monstache.

timansky avatar timansky commented on August 17, 2024

i think gelf more reliable/universal protocol

yeah verbose is slow when stdout, my use case is docker container
it sends logs to stdout and then docker redirects it to graylog(gelf protocol)

it is better to have logs (maybe somekind error|warn level only) to analyze what went wrong

from monstache.

rwynn avatar rwynn commented on August 17, 2024

It logs errors no matter what. I only logs the entire request/response trace when verbose is on. You probably should turn verbose off in your container and just use gelf for errors.

from monstache.

rwynn avatar rwynn commented on August 17, 2024

@timansky just added release 3.6.1 to help out a little bit hopefully. You can force test of this error logging by inserting documents with incompatible types.

db.test.insert({foo: 1}); db.test.insert({foo: "abc"});
With this enabled you should be able to safely turn off verbose and still get enough info to determine what went wrong.

from monstache.

timansky avatar timansky commented on August 17, 2024

thanks, will test.

PS
meanwhile i've asked for direct graylog(gelf) functionality because of mine method doesn't parse multiline messages

from monstache.

rwynn avatar rwynn commented on August 17, 2024

Are you asking for logging in monstache to be done via something like https://github.com/Graylog2/go-gelf with new config option to specify graylog server monstache must connect to? Sorry I did not understand your request.

from monstache.

timansky avatar timansky commented on August 17, 2024

yeap, this will be perfect

from monstache.

rwynn avatar rwynn commented on August 17, 2024

@timansky can you please build using go get -u github.com/rwynn/monstache and then run monstache with flag -graylog-addr localhost:12201 or whatever your server is set to and let me know how that goes?

from monstache.

rwynn avatar rwynn commented on August 17, 2024

scratch that, you can just try 3.6.4 now instead of building from source.

from monstache.

rwynn avatar rwynn commented on August 17, 2024

@timansky I added the option to set -graylog-addr. Let me know if this is OK. Thanks. Graylog can categorized the message by the prefix right? I'm assuming it works like Logstash.

from monstache.

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.