From: Hiroshi Nakamura Date: 2011-01-14T21:05:34+09:00 Subject: [ruby-core:34496] Re: [Ruby 1.9-Bug#3869] Logger#log does not handle or escape new-line characters. Hal, sorry for not responding long time. On Thu, Jan 13, 2011 at 16:09, Motohiro KOSAKI wrote: > Hal nahi-san, It this good enough? KOSAKI-san, thanks for picking up this issue and creating the patch. But I don't think it's good to escape strings for logging because; Logger is originally created for logging arbitrary bytes for post-mortem analysis by human, not for live monitoring nor auditing. So I don't think I need to escape things for parsing. I know users often use logfiles for live monitoring, scanning /ERROR/ each minutes for example, but it's OK to pick false-positive incidents for that purpose I believe. If it's not OK, we can use syslog or auditing with DB or CSV formatted file. Beside this, we can use Logger#formatter= for that purpose: logger.formatter = proc {|*args| CSV.generate_line(args)} That said, I understand users could use Logger for those kinds of unexpected purposes. Hal, it would help me a great deal if you can provide me a warning message "Take care for using these purpose" or something, for adding to RDoc of Logger, based on your logging purpose. Can you? Regards, // NaHi