Skip to content

Commit 04c9e2e

Browse files
jcraigkdblock
authored andcommitted
Expose Slack::RealTime::Client.logger accessor publicly (#290)
1 parent 5c61124 commit 04c9e2e

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### 0.14.4 (Next)
22

33
* [#289](https://github.com/slack-ruby/slack-ruby-client/pull/289): Fix reconnects when ping timers under/overshoot - [@georgyangelov](https://github.com/georgyangelov).
4+
* [#290](https://github.com/slack-ruby/slack-ruby-client/pull/290): Expose Slack::RealTime::Client.logger accessor publicly - [@jcraigk](https://github.com/jcraigk).
45
* Your contribution here.
56

67
### 0.14.3 (2019/7/23)

lib/slack/real_time/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class << self
1919
attr_accessor :store
2020
attr_accessor :url
2121
attr_accessor(*Config::ATTRIBUTES)
22+
attr_accessor :logger
2223

23-
protected :logger, :logger=
2424
protected :store_class, :store_class=
2525

2626
def initialize(options = {})

spec/slack/real_time/client_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,15 @@
328328
end
329329
end
330330
end
331+
describe 'logger accessor' do
332+
let(:client) { Slack::RealTime::Client.new }
333+
it 'exposes public logger' do
334+
expect(client.logger).to be_a(::Logger)
335+
end
336+
it 'exposes public logger=' do
337+
expect { client.logger = nil }.not_to raise_error(NoMethodError)
338+
end
339+
end
331340
end
332341
context 'global config' do
333342
after do

0 commit comments

Comments
 (0)