Module: BackchatClient::BackchatLogger
- Included in:
- Backchat, Backchat::Client, Channel, HttpClient, Stream, User
- Defined in:
- lib/backchat_client/backchat_logger.rb
Overview
This module injects methods to handle log mechanism
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
Nice way to include the Module methods when including it in a class/module.
Instance Method Summary collapse
-
#debug(message) ⇒ Object
debug message with the class name a the beginning of the log.
-
#error(message) ⇒ Object
error message with the class name a the beginning of the log.
- #logger ⇒ Object
Class Method Details
.included(base) ⇒ Object
Nice way to include the Module methods when including it in a class/module
12 13 14 |
# File 'lib/backchat_client/backchat_logger.rb', line 12 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#debug(message) ⇒ Object
debug message with the class name a the beginning of the log
65 66 67 |
# File 'lib/backchat_client/backchat_logger.rb', line 65 def debug() logger.debug "#{self.class} #{}" end |
#error(message) ⇒ Object
error message with the class name a the beginning of the log
70 71 72 |
# File 'lib/backchat_client/backchat_logger.rb', line 70 def error() logger.error "#{self.class} #{}" end |
#logger ⇒ Object
60 61 62 |
# File 'lib/backchat_client/backchat_logger.rb', line 60 def logger self.class.logger end |