lograge
lograge copied to clipboard
An attempt to tame Rails' default policy to log everything.
Need help. I want to get log data in some models through `ActiveSupport::Notifications.subscribe` when object after created, such as ``` ActiveSupport::Notifications.subscribe "process_action.action_controller" do |name, start, finish, unique_id, payload| Rails.logger.debug("[NOTIFICATION] #{name}...
Apologies if this issue is a bit messy. ### Description So it would appear, contrary to the README and original PR https://github.com/roidrage/lograge/pull/61, using `keep_original_rails_log` does the **opposite** of what I'd...
I need logging only error level, so I trying write ```ruby # config/environments/production.rb config.lograge.enabled = true config.lograge.log_level = :error config.lograge.logger = ActiveSupport::Logger.new File.join(Rails.root, 'log', "lograge_#{Rails.env}.log") config.lograge.formatter = Lograge::Formatters::Json.new # I...
Tried installing this in an old ruby instance, as expected it didn't work because it's using the new hash syntax: ``` SyntaxError: /usr/local/rvm/gems/ree-1.8.7-2012.02/gems/lograge-0.3.6/lib/lograge/formatters/graylog2.rb:9: odd number list for Hash short_message: short_message(data_clone)...
Is there a way to leverage lograge to tame Rails' asset logging noise? I'm looking to completely eliminate everything after line 2. Running Rails 5.1 ``` (1.1ms) SELECT "schema_migrations"."version" FROM...
It makes it difficult when bumping dependencies. Thanks for reading.
It would be useful to support multiple customizations throughout the app and the gems used. Currently some kind of hack is needed to preserve previous customizations. An example case: https://github.com/elastic/elasticsearch-rails/issues/749...
This PR fixes following offenses. ``` Offenses: lograge.gemspec:31:5: C: [Corrected] Gemspec/AddRuntimeDependency: Use add_dependency instead of add_runtime_dependency. s.add_runtime_dependency 'actionpack', '>= 4' ^^^^^^^^^^^^^^^^^^^^^^ lograge.gemspec:32:5: C: [Corrected] Gemspec/AddRuntimeDependency: Use add_dependency instead of add_runtime_dependency....
This wraps autoloaded Action Cable constants with on_load hooks to ensure they are deferred and speed up application boot: - https://api.rubyonrails.org/classes/ActiveSupport/LazyLoadHooks.html - https://island94.org/2024/07/on-the-importance-of-rails-code-reloading
Environment: Rails 5 Code: ```ruby config/environments/production.rb if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new(STDOUT) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end # loggly settings - lograge config.lograge.enabled = true config.lograge.formatter = Lograge::Formatters::Json.new config.lograge.custom_options...