Module: McBlocky::Logging
Constant Summary collapse
- RESET =
"\e[0m"
- BOLD =
"\e[1m"
- RED =
"\e[31m"
- GREEN =
"\e[32m"
- YELLOW =
"\e[33m"
- BLUE =
"\e[34m"
- MAGENTA =
"\e[35m"
- CYAN =
"\e[36m"
- WHITE =
"\e[37m"
- @@mutex =
Mutex.new
Instance Method Summary collapse
- #log_command(message) ⇒ Object
- #log_error(message) ⇒ Object
- #log_message(message) ⇒ Object
- #log_server(message) ⇒ Object
- #log_status(message) ⇒ Object
Instance Method Details
#log_command(message) ⇒ Object
27 28 29 30 31 |
# File 'lib/mcblocky/logging.rb', line 27 def log_command() @@mutex.synchronize do puts "#{CYAN}#{BOLD}/#{.chomp}#{RESET}" end end |
#log_error(message) ⇒ Object
39 40 41 42 43 |
# File 'lib/mcblocky/logging.rb', line 39 def log_error() @@mutex.synchronize do puts "#{RED}#{BOLD}---> #{.chomp}#{RESET}" end end |
#log_message(message) ⇒ Object
21 22 23 24 25 |
# File 'lib/mcblocky/logging.rb', line 21 def () @@mutex.synchronize do puts "#{MAGENTA}#{.chomp}#{RESET}" end end |