Tag: Rails3/ログ出力の改善
class Logger class Formatter def call(severity, time, progname, msg) format = "[%s] %s %s\n" format % ["#{time.strftime('%Y-%m-%d %H:%M:%S')}", severity, msg2str(msg)] end end end
config.logger = Logger.new(config.paths["log"].first) config.logger.formatter = Logger::Formatter.new config.logger.level = Logger::DEBUG config.colorize_logging = false