Skip to content

Commit f8ce899

Browse files
authored
Disable Bugsnag api key validation
https://github.com/bugsnag/bugsnag-ruby/blob/bdfbf3972f2137b3b9b95194a6bedf9c8edf6555/lib/bugsnag.rb#L61 This will remove the warning "No valid API key has been set, notifications will not be sent" that will be logged in all environments as the api key hasn't been set yet as that happens later in the initialization process.
1 parent f3aea8c commit f8ce899

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rails_semantic_logger/engine.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Engine < ::Rails::Engine
127127
end
128128

129129
# Replace the Bugsnag logger
130-
Bugsnag.configure { |config| config.logger = SemanticLogger[Bugsnag] } if defined?(Bugsnag)
130+
Bugsnag.configure(false) { |config| config.logger = SemanticLogger[Bugsnag] } if defined?(Bugsnag)
131131

132132
# Set the IOStreams PGP logger
133133
IOStreams::Pgp.logger = SemanticLogger["IOStreams::Pgp"] if defined?(IOStreams)
@@ -138,7 +138,7 @@ class Engine < ::Rails::Engine
138138
config = Rails.application.config
139139

140140
# Replace the Bugsnag logger
141-
Bugsnag.configure { |bugsnag_config| bugsnag_config.logger = SemanticLogger[Bugsnag] } if defined?(Bugsnag)
141+
Bugsnag.configure(false) { |bugsnag_config| bugsnag_config.logger = SemanticLogger[Bugsnag] } if defined?(Bugsnag)
142142

143143
# Rails Patches
144144
require("rails_semantic_logger/extensions/action_cable/tagged_logger_proxy") if defined?(::ActionCable)

0 commit comments

Comments
 (0)