Class: MsTeamsNotification::Logger

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/ms_teams_notification/logger.rb

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



8
9
10
11
# File 'lib/ms_teams_notification/logger.rb', line 8

def initialize
  @logger = ::Logger.new $stdout
  @logger.level = ::Logger::DEBUG
end

Instance Method Details

#msg(*message, level: :info) ⇒ Object



13
14
15
# File 'lib/ms_teams_notification/logger.rb', line 13

def msg *message, level: :info
  @logger.send level.to_s, message.join("").to_s if @logger.respond_to?(level)
end