Class: SignIn::Logger

Inherits:
Object
  • Object
show all
Defined in:
app/services/sign_in/logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prefix:) ⇒ Logger

Returns a new instance of Logger.



9
10
11
# File 'app/services/sign_in/logger.rb', line 9

def initialize(prefix:)
  @prefix = prefix
end

Instance Attribute Details

#prefixObject (readonly)

Returns the value of attribute prefix.



7
8
9
# File 'app/services/sign_in/logger.rb', line 7

def prefix
  @prefix
end

Instance Method Details

#info(message, context = {}) ⇒ Object



13
14
15
# File 'app/services/sign_in/logger.rb', line 13

def info(message, context = {})
  Rails.logger.info("[SignInService] [#{prefix}] #{message}", context)
end