Module: Celluloid::Logger

Defined in:
lib/vendor/celluloid/lib/celluloid/logger.rb

Class Method Summary collapse

Class Method Details

.crash(string, exception) ⇒ Object

Handle a crash



26
27
28
29
30
# File 'lib/vendor/celluloid/lib/celluloid/logger.rb', line 26

def crash(string, exception)
  string += "\n#{exception.class}: #{exception.to_s}\n"
  string << exception.backtrace.join("\n")
  error(string)
end

.debug(string) ⇒ Object

Send a debug message



6
7
8
# File 'lib/vendor/celluloid/lib/celluloid/logger.rb', line 6

def debug(string)
  Celluloid.logger.debug(string) if Celluloid.logger
end

.error(string) ⇒ Object

Send an error message



21
22
23
# File 'lib/vendor/celluloid/lib/celluloid/logger.rb', line 21

def error(string)
  Celluloid.logger.error(string) if Celluloid.logger
end

.info(string) ⇒ Object

Send a info message



11
12
13
# File 'lib/vendor/celluloid/lib/celluloid/logger.rb', line 11

def info(string)
  Celluloid.logger.info(string) if Celluloid.logger
end

.warn(string) ⇒ Object

Send a warning message



16
17
18
# File 'lib/vendor/celluloid/lib/celluloid/logger.rb', line 16

def warn(string)
  Celluloid.logger.warn(string) if Celluloid.logger
end