Module: Ringleader::NameLogger

Included in:
Process
Defined in:
lib/ringleader/name_logger.rb

Instance Method Summary collapse

Instance Method Details

#debug(string) ⇒ Object

Send a debug message



4
5
6
# File 'lib/ringleader/name_logger.rb', line 4

def debug(string)
  super with_name(string)
end

#error(string) ⇒ Object

Send an error message



19
20
21
# File 'lib/ringleader/name_logger.rb', line 19

def error(string)
  super with_name(string)
end

#info(string) ⇒ Object

Send a info message



9
10
11
# File 'lib/ringleader/name_logger.rb', line 9

def info(string)
  super with_name(string)
end

#warn(string) ⇒ Object

Send a warning message



14
15
16
# File 'lib/ringleader/name_logger.rb', line 14

def warn(string)
  super with_name(string)
end

#with_name(string) ⇒ Object



23
24
25
26
# File 'lib/ringleader/name_logger.rb', line 23

def with_name(string)
  colorized = config.name.color(config.color)
  "#{colorized} | #{string}"
end