From e82bc475f8054f9781ddb253ae2a39979d515c53 Mon Sep 17 00:00:00 2001 From: "Paul Buetow (uranus)" Date: Sun, 18 Oct 2015 11:03:20 +0100 Subject: add timestamp option --- rubyfy.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rubyfy.rb') diff --git a/rubyfy.rb b/rubyfy.rb index c19e025..1f33302 100755 --- a/rubyfy.rb +++ b/rubyfy.rb @@ -136,7 +136,8 @@ private return if severity == :VERBOSE and not @conf["verbose"] return if severity == :DEBUG and not @conf["debug"] - message = "#{severity}::#{message}" + timestamp = @conf["timestamp"] ? "#{Time.now}::" : "" + message = "#{timestamp}#{severity}::#{message}" @log_mutex.synchronize do puts message @@ -158,6 +159,7 @@ begin [ "--parallel", "-p", GetoptLong::OPTIONAL_ARGUMENT ], [ "--root", "-r", GetoptLong::OPTIONAL_ARGUMENT ], [ "--silent", "-s", GetoptLong::OPTIONAL_ARGUMENT ], + [ "--timestamp", "-t", GetoptLong::OPTIONAL_ARGUMENT ], [ "--user", "-u", GetoptLong::OPTIONAL_ARGUMENT ], [ "--verbose", "-v", GetoptLong::OPTIONAL_ARGUMENT ], ) -- cgit v1.2.3