Giter Club home page Giter Club logo

Comments (5)

MarcGrimme avatar MarcGrimme commented on July 18, 2024 2

You might want to check #108 .
There is still one open topic but for me it's minor and should be fixed in another subsequent PR.
Comments welcome.

from logstasher.

sfate avatar sfate commented on July 18, 2024

Seems problem occurs for any log_level..
As you can see here: https://github.com/shadabahmed/logstasher/blob/master/lib/logstasher/railtie.rb#L7
Logstasher initialized as instance of ActiveSupport::OrderedOptions:

config.logstasher = ActiveSupport::OrderedOptions.new

But in new rails it also inherit an ActiveSupport default logger, which sending output to stdout.

And after that.. we moving to setup method.. where we have already defined logger:

self.logger = app.config.logstasher.logger || new_logger(self.logger_path)

And now at any call of logger output sends to default ActiveSupport::OrderedOptions logger..

This can be monkeypatched as follow:

# add this info your development.rb or other environment file
config.to_prepare do
  LogStasher.logger = Logger.new("#{Rails.root}/log/logstash_#{Rails.env}.log")
end

from logstasher.

hut8 avatar hut8 commented on July 18, 2024

+1 for this issue -- even with the monkey patch, I can't get my development Rails.logger.info to display anything in the logstash log.

from logstasher.

astutejoe avatar astutejoe commented on July 18, 2024

Same here... Even with the ninja Monkey Patch, no logger calls is logged

from logstasher.

MarcGrimme avatar MarcGrimme commented on July 18, 2024

Other then this I'd say get it merged soon as this is really a pain.

from logstasher.

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.