-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
{config,loggable}: set default Logger level to Logger::WARN
Issue #550 mentions that README states that our default logger is `Logger::WARN`, however the code never sets that level. The default value is `Logger::DEBUG`, which is unwanted, since it generates a lot of clutter.
- Loading branch information
Showing
5 changed files
with
30 additions
and
2 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
RSpec.describe Airbrake::Loggable do | ||
describe ".instance" do | ||
it "returns a logger" do | ||
expect(described_class.instance).to be_a(Logger) | ||
end | ||
end | ||
|
||
describe "#logger" do | ||
let(:subject) do | ||
Class.new { include Airbrake::Loggable }.new | ||
end | ||
|
||
it "returns a logger that has Logger::WARN severity" do | ||
expect(subject.logger.level).to eq(Logger::WARN) | ||
end | ||
end | ||
end |