Module: ZmLogger
- Included in:
- Zm::Client::ClusterConfig, Zm::Client::SoapBaseConnector
- Defined in:
- lib/zm/modules/zm_logger.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#logger_file_path ⇒ Object
Returns the value of attribute logger_file_path.
-
#logger_level ⇒ Object
Returns the value of attribute logger_level.
Instance Method Summary collapse
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/zm/modules/zm_logger.rb', line 4 def logger @logger end |
#logger_file_path ⇒ Object
Returns the value of attribute logger_file_path.
4 5 6 |
# File 'lib/zm/modules/zm_logger.rb', line 4 def logger_file_path @logger_file_path end |
#logger_level ⇒ Object
Returns the value of attribute logger_level.
4 5 6 |
# File 'lib/zm/modules/zm_logger.rb', line 4 def logger_level @logger_level end |
Instance Method Details
#init_logger ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/zm/modules/zm_logger.rb', line 18 def init_logger logger = Logger.new(logger_file_path) logger.level = logger_level logger.formatter = proc do |severity, datetime, prog_name, msg| "#{datetime.strftime('%Y-%m-%d %H:%M:%S')} #{severity} #{prog_name} - #{msg}\n" end logger end |