forked from shadabahmed/logstasher
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Overhaul some behaviors of this gem
1. You should be able to set `enabled=false` and that means you will not log anything. Period. 2. You should be able to set `enabled=true` with `silence_standard_logging=true` and it will not include any of the log subscriber code, but it will allow you to log anything custom. 3. You should be able to recreate existing behavior with a different configuration. Example: ``` # directly updating code ::LogStasher.logger = ::Logger.new( ::Rails.root.join("log", "logstash_#{Rails.env}.log")) # via the device factory device = ::LogStasher::Device::Factory(type: :file, path: ::Rails.root.join("log", "logstash_#{Rails.env}.log")) ::LogStasher.logger = ::Logger.new(device) ``` NOTE: This is a breaking change, but it might make default behaviors easier to understand. Right now when `enable=false` it causes logs to be piped to the logstash log file for rails apps, and that seems very awkward. Maybe this is worth fixing?
- Loading branch information
Showing
4 changed files
with
15 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.