Class: SignIn::Logger
- Inherits:
-
Object
- Object
- SignIn::Logger
- Defined in:
- app/services/sign_in/logger.rb
Instance Attribute Summary collapse
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Instance Method Summary collapse
- #info(message, context = {}) ⇒ Object
-
#initialize(prefix:) ⇒ Logger
constructor
A new instance of Logger.
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
#prefix ⇒ Object (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(, context = {}) Rails.logger.info("[SignInService] [#{prefix}] #{}", context) end |