Module: Crusade::Logger
- Defined in:
- lib/crusade/logger.rb
Class Method Summary collapse
- .debug(message) ⇒ Object
- .debug? ⇒ Boolean
- .error(message) ⇒ Object
- .error? ⇒ Boolean
- .fatal(message) ⇒ Object
- .fatal? ⇒ Boolean
- .info(message) ⇒ Object
- .info? ⇒ Boolean
- .log(message) ⇒ Object
- .logger ⇒ Object
- .logger=(logger) ⇒ Object
- .unknown(message) ⇒ Object
- .warn(message) ⇒ Object
- .warn? ⇒ Boolean
Class Method Details
.debug(message) ⇒ Object
19 20 21 |
# File 'lib/crusade/logger.rb', line 19 def debug logger.debug caller.first do end end |
.debug? ⇒ Boolean
23 24 25 |
# File 'lib/crusade/logger.rb', line 23 def debug? logger.debug? end |
.error(message) ⇒ Object
27 28 29 |
# File 'lib/crusade/logger.rb', line 27 def error logger.error caller.first do end end |
.error? ⇒ Boolean
31 32 33 |
# File 'lib/crusade/logger.rb', line 31 def error? logger.error? end |
.fatal(message) ⇒ Object
35 36 37 |
# File 'lib/crusade/logger.rb', line 35 def fatal logger.fatal caller.first do end end |
.fatal? ⇒ Boolean
39 40 41 |
# File 'lib/crusade/logger.rb', line 39 def fatal? logger.fatal? end |
.info(message) ⇒ Object
43 44 45 |
# File 'lib/crusade/logger.rb', line 43 def info logger.info caller.first do end end |
.info? ⇒ Boolean
47 48 49 |
# File 'lib/crusade/logger.rb', line 47 def info? logger.info? end |
.log(message) ⇒ Object
51 52 53 |
# File 'lib/crusade/logger.rb', line 51 def log logger.log caller.first do end end |
.logger ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/crusade/logger.rb', line 7 def logger log = Crusade::Logger.instance_variable_get "@logger" unless log log = Crusade::Logger.logger = Crusade::NullLogger.new end log end |
.logger=(logger) ⇒ Object
15 16 17 |
# File 'lib/crusade/logger.rb', line 15 def logger= logger Crusade::Logger.instance_variable_set "@logger", logger end |
.unknown(message) ⇒ Object
55 56 57 |
# File 'lib/crusade/logger.rb', line 55 def unknown logger.unknown caller.first do end end |
.warn(message) ⇒ Object
59 60 61 |
# File 'lib/crusade/logger.rb', line 59 def warn logger.warn caller.first do end end |
.warn? ⇒ Boolean
63 64 65 |
# File 'lib/crusade/logger.rb', line 63 def warn? logger.warn? end |