Method: MotionPrime::Logger#log
- Defined in:
- motion-prime/services/logger.rb
#log(objects, label = '', color = :none) ⇒ Object
Log message, colorized if using simulator.
28 29 30 31 32 33 34 35 36 37 |
# File 'motion-prime/services/logger.rb', line 28 def log(objects, label = '', color = :none) = "#{label || 'PRIME_LOG'} : " + Array.wrap(objects).map(&:inspect).join(',') if Device.simulator? color_parts = COLORS[color] || COLORS[:none] output(color_parts.first + + color_parts.last) else output() end objects end |