Module: EasyML::Logging
- Included in:
- Data::Dataset
- Defined in:
- lib/easy_ml/logging.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #log_info(message) ⇒ Object
- #log_message(message, verbose: false) ⇒ Object
- #log_verbose(message) ⇒ Object
- #log_warning(message) ⇒ Object
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/easy_ml/logging.rb', line 3 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#log_info(message) ⇒ Object
34 35 36 |
# File 'lib/easy_ml/logging.rb', line 34 def log_info() puts "\e[34mINFO: #{}\e[0m" end |
#log_message(message, verbose: false) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/easy_ml/logging.rb', line 18 def (, verbose: false) if verbose log_verbose() else puts end end |
#log_verbose(message) ⇒ Object
26 27 28 |
# File 'lib/easy_ml/logging.rb', line 26 def log_verbose() puts if @verbose end |
#log_warning(message) ⇒ Object
30 31 32 |
# File 'lib/easy_ml/logging.rb', line 30 def log_warning() puts "\e[33mWARNING: #{}\e[0m" end |