deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 1/3] Core: Do not overide log file when running as a daemon
Date Thu, 21 Feb 2013 12:43:55 GMT
From: Michal Fojtik <mfojtik@redhat.com>

The -L/--log option is ignored when you run Deltacloud
in 'daemon' mode (-d). This cause Deltacloud to log into
syslog even user specify the log file location explicately.

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/bin/deltacloudd | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/bin/deltacloudd b/server/bin/deltacloudd
index e0ac8a4..8cb8702 100755
--- a/server/bin/deltacloudd
+++ b/server/bin/deltacloudd
@@ -231,7 +231,9 @@ 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(options[:logdir], "#{ENV['API_DRIVER']}.log")]
+    unless ENV['API_LOG']
+      argv_opts << [ "--log", File.join(options[:logdir], "#{ENV['API_DRIVER']}.log")]
+    end
   end
   argv_opts.flatten!
 
-- 
1.8.1.2


Mime
View raw message