Class: LightGptProxy::Logger
- Inherits:
-
Object
- Object
- LightGptProxy::Logger
- Defined in:
- lib/light_gpt_proxy/logger.rb
Instance Attribute Summary collapse
-
#io ⇒ Object
readonly
Returns the value of attribute io.
-
#verbose ⇒ Object
readonly
Returns the value of attribute verbose.
Instance Method Summary collapse
- #error(message, opts = {}) ⇒ Object
- #info(message, opts = {}) ⇒ Object
-
#initialize(io, verbose:) ⇒ Logger
constructor
A new instance of Logger.
- #warn(message, opts = {}) ⇒ Object
Constructor Details
#initialize(io, verbose:) ⇒ Logger
Returns a new instance of Logger.
5 6 7 8 |
# File 'lib/light_gpt_proxy/logger.rb', line 5 def initialize(io, verbose:) @io = io @verbose = verbose end |
Instance Attribute Details
#io ⇒ Object (readonly)
Returns the value of attribute io.
10 11 12 |
# File 'lib/light_gpt_proxy/logger.rb', line 10 def io @io end |
#verbose ⇒ Object (readonly)
Returns the value of attribute verbose.
10 11 12 |
# File 'lib/light_gpt_proxy/logger.rb', line 10 def verbose @verbose end |
Instance Method Details
#error(message, opts = {}) ⇒ Object
20 21 22 |
# File 'lib/light_gpt_proxy/logger.rb', line 20 def error(, opts = {}) log('ERROR', , opts) end |
#info(message, opts = {}) ⇒ Object
12 13 14 |
# File 'lib/light_gpt_proxy/logger.rb', line 12 def info(, opts = {}) log('INFO', , opts) end |
#warn(message, opts = {}) ⇒ Object
16 17 18 |
# File 'lib/light_gpt_proxy/logger.rb', line 16 def warn(, opts = {}) log('WARN', , opts) end |