summaryrefslogtreecommitdiff
path: root/rubyfy.rb
diff options
context:
space:
mode:
authorPaul Buetow (uranus) <paul@buetow.org>2015-10-18 11:03:20 +0100
committerPaul Buetow (uranus) <paul@buetow.org>2015-10-18 11:03:20 +0100
commite82bc475f8054f9781ddb253ae2a39979d515c53 (patch)
tree31eca8aa74d3ac15f8b3309cd816efcfb7f06de7 /rubyfy.rb
parentcf0d0f80ad70f99b6ea861dd8faaccff0b74f83b (diff)
add timestamp option
Diffstat (limited to 'rubyfy.rb')
-rwxr-xr-xrubyfy.rb4
1 files changed, 3 insertions, 1 deletions
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 ],
)