【发布时间】:2014-10-23 20:33:48
【问题描述】:
我很惊讶我还没能在 SO 上找到这个。
我希望能够在输出到控制台的日志输出中为特定的字符串段着色。所以是这样的:
"This part of the message in Green: This part in Blue"
可能是这样写的:
Rails.logger.debug("This part of the message in Green: ".green + "This part in Blue".blue)
【问题讨论】:
标签: ruby-on-rails ruby logging colors console