deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject git commit: * server/bin/deltacloudd: make logdir configurable
Date Wed, 08 Feb 2012 00:57:29 GMT
Updated Branches:
  refs/heads/master 28120de64 -> f2fffe85b


* server/bin/deltacloudd: make logdir configurable


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/f2fffe85
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/f2fffe85
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/f2fffe85

Branch: refs/heads/master
Commit: f2fffe85b7826a8627e51eeb78ef3c1d3e1d25dd
Parents: 28120de
Author: David Lutterkort <lutter@redhat.com>
Authored: Tue Feb 7 16:53:13 2012 -0800
Committer: David Lutterkort <lutter@redhat.com>
Committed: Tue Feb 7 16:57:15 2012 -0800

----------------------------------------------------------------------
 server/bin/deltacloudd |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f2fffe85/server/bin/deltacloudd
----------------------------------------------------------------------
diff --git a/server/bin/deltacloudd b/server/bin/deltacloudd
index eb71687..57b6c49 100755
--- a/server/bin/deltacloudd
+++ b/server/bin/deltacloudd
@@ -37,7 +37,8 @@ end
 DEFAULT_CONFIG = "~/.deltacloud/config"
 
 options = {
-  :env => 'development'
+  :env => 'development',
+  :logdir => "/var/log/deltacloud-core"
 }
 optparse = OptionParser.new do |opts|
 
@@ -86,6 +87,9 @@ BANNER
   opts.on(  nil, '--webrick', 'Force the use of WEBRick as a server') do |opt|
     options[:webrick] = true
   end
+  opts.on('--logdir LOGDIR', "Directory for log files, defaults to #{options[:logdir]}")
do |opt|
+    options[:logdir] = opt
+  end
   opts.on( '-h', '--help', '') { options[:help] = true }
 
   opts.separator <<EOS
@@ -219,7 +223,7 @@ else
     argv_opts << [ "--daemonize", "--user", options[:user] || 'nobody', "--tag", "deltacloud-#{ENV['API_DRIVER']}"]
     argv_opts << [ "--pid", options[:pid]] if options[:pid]
     argv_opts << [ "--group", options[:group] || 'nobody' ]
-    argv_opts << [ "--log", File.join("/var/log/deltacloud-core", "#{ENV['API_DRIVER']}.log")]
+    argv_opts << [ "--log", File.join(options[:logdir], "#{ENV['API_DRIVER']}.log")]
   end
   argv_opts.flatten!
 


Mime
View raw message