Class: Zold::Log
- Inherits:
-
Object
- Object
- Zold::Log
- Defined in:
- lib/zold/log.rb
Overview
Logging
Defined Under Namespace
Constant Summary collapse
- MUTEX =
Mutex.new
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.print(text) ⇒ Object
33 34 35 36 37 |
# File 'lib/zold/log.rb', line 33 def self.print(text) MUTEX.synchronize do puts(text) end end |
Instance Method Details
#debug(msg) ⇒ Object
39 40 41 |
# File 'lib/zold/log.rb', line 39 def debug(msg) # nothing end |
#debug? ⇒ Boolean
43 44 45 |
# File 'lib/zold/log.rb', line 43 def debug? false end |
#error(msg) ⇒ Object
55 56 57 |
# File 'lib/zold/log.rb', line 55 def error(msg) Log.print("#{Rainbow('ERROR').red}: #{msg}") end |
#info? ⇒ Boolean
51 52 53 |
# File 'lib/zold/log.rb', line 51 def info? true end |