lib/pilfer/logger.rb in pilfer-0.0.1.pre3 vs lib/pilfer/logger.rb in pilfer-0.0.1.pre4

- old
+ new

@@ -6,11 +6,11 @@ attr_reader :app_root, :logger def initialize(path_or_io, options = {}) @logger = ::Logger.new(path_or_io) if (app_root = options[:app_root]) - app_root += '/' unless app_root[-1] == '/' + app_root += '/' unless app_root[-1, 1] == '/' @app_root = %r{^#{Regexp.escape(app_root)}} end end def write(profile_data, profile_start) @@ -23,10 +23,11 @@ end private def print_report_banner(profile_start) - logger.info "Profile start=#{profile_start.utc.to_s}" + formatted_start = profile_start.utc.strftime('%Y-%m-%d %H:%M:%S UTC') + logger.info "Profile start=#{formatted_start}" end def print_file_banner(path, data) wall = data['wall_time'] / 1000.0 cpu = data['cpu_time'] / 1000.0