From 443aa706d1ad7198fc8777d7efa0b809200bfdf9 Mon Sep 17 00:00:00 2001 From: harishspattern Date: Tue, 5 Sep 2023 11:14:52 +0530 Subject: [PATCH] DIST-10392 Declared logger for MuffinMan class --- lib/muffin_man.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/muffin_man.rb b/lib/muffin_man.rb index b09e26f..672203a 100644 --- a/lib/muffin_man.rb +++ b/lib/muffin_man.rb @@ -34,7 +34,7 @@ def initialize(auth_response) end class << self - attr_accessor :configuration, :logger + attr_accessor :configuration, :log end def self.configure @@ -42,6 +42,11 @@ def self.configure yield(configuration) end + def self.logger + self.log ||= MuffinMan::MuffinLogger.logger + yield(log) + end + class Configuration attr_accessor :save_access_token, :get_access_token end