Skip to content

Commit 80a8f16

Browse files
committed
it changes default logging behavior to not log at all
1 parent 2d6d936 commit 80a8f16

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,14 @@ If you need ONLY logging or metrics use "logging" or "metrics" mode accordingly.
6262

6363
config.mode = :metrics
6464

65-
You can set minimal level of logs, which should be caught by gem:
66-
67-
config.log_level = :error
68-
6965
If you want to use proxy for sending request, you can do it in such way:
7066

7167
config.proxy = { uri: '127.0.0.1:8118', user: 'user_name', password: 'some_password' }
7268

73-
For internal logging stackify-api-ruby uses such logger:
69+
For internal logging stackify-api-ruby you can use such logger:
7470

7571
config.logger = Logger.new(File.join(Rails.root, "log", "stackify.log"))
72+
config.logger.level = Logger::DEBUG
7673

7774
After logs configuring you should wrap up your logger:
7875

lib/stackify/utils/configuration.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ def initialize
1717
@send_interval = 60
1818
@log_level = :info
1919
@mode = MODES[:both]
20-
@logger = if defined? Rails
21-
Logger.new(File.join(Rails.root, 'log', 'stackify.log'))
22-
else
23-
Logger.new('stackify.log')
24-
end
20+
@logger = Logger.new(STDOUT)
21+
@logger.level = Logger::UNKNOWN
2522
end
2623

2724
def is_valid?

0 commit comments

Comments
 (0)