Module: RuneRb::Core::Logging
- Included in:
- RuneRb::Cache::Archive, RuneRb::Cache::FileSystem, RuneRb::Cache::Index, Archive, Unit
- Defined in:
- lib/rune/core/logging.rb
Overview
A module responsible for setting up logging functions.
Instance Method Summary collapse
-
#err(*lines) ⇒ Object
(also: #error)
Write an error to the log.
-
#err!(*lines) ⇒ Object
(also: #fatal)
Write a fatal error to the log.
-
#log(*lines) ⇒ Object
(also: #info)
Write information to the log.
-
#log!(*lines) ⇒ Object
(also: #warn)
Write a warning to the log.
Instance Method Details
#err(*lines) ⇒ Object Also known as: error
Write an error to the log.
24 25 26 |
# File 'lib/rune/core/logging.rb', line 24 def err(*lines) RuneRb.logger.error(self.class.name) { lines.join("\n") } end |
#err!(*lines) ⇒ Object Also known as: fatal
Write a fatal error to the log.
32 33 34 |
# File 'lib/rune/core/logging.rb', line 32 def err!(*lines) RuneRb.logger.fatal(self.class.name) { lines.join("\n") } end |
#log(*lines) ⇒ Object Also known as: info
Write information to the log.
8 9 10 |
# File 'lib/rune/core/logging.rb', line 8 def log(*lines) RuneRb.logger.info(self.class.name) { lines.join("\n") } end |
#log!(*lines) ⇒ Object Also known as: warn
Write a warning to the log.
16 17 18 |
# File 'lib/rune/core/logging.rb', line 16 def log!(*lines) RuneRb.logger.warn(self.class.name) { lines.join("\n") } end |