[Kimchi-devel] [PATCH] [Wok 1/6] Remove --access-log and --error-log options from wokd command

Aline Manera alinefm at linux.vnet.ibm.com
Wed Jan 11 17:27:37 UTC 2017


Make it consistent with Wok configuration file options.
There, the user may only specify the log directory instead of the log
file. So do that while using the wokd command directly.

Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
 src/wokd.in | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/wokd.in b/src/wokd.in
index 339e4e1..c2b34e1 100644
--- a/src/wokd.in
+++ b/src/wokd.in
@@ -2,7 +2,7 @@
 #
 # Project Wok
 #
-# Copyright IBM Corp, 2015-2016
+# Copyright IBM Corp, 2015-2017
 #
 # Code derived from Project Kimchi
 #
@@ -66,12 +66,7 @@ def main(options):
                            "(default %s)" % session_timeout)
     parser.add_option('--log-level', default=logLevel,
                       help="Logging level")
-    parser.add_option('--access-log',
-                      default=os.path.join(logDir, ACCESS_LOG),
-                      help="Access log file")
-    parser.add_option('--error-log',
-                      default=os.path.join(logDir, ERROR_LOG),
-                      help="Error log file")
+    parser.add_option('--log-dir', default=logDir, help="Log directory")
     parser.add_option('--environment', default=runningEnv,
                       help="Running environment of wok server")
     parser.add_option('--test', action='store_true',
@@ -80,6 +75,9 @@ def main(options):
                       help="Relative path to server")
     (options, args) = parser.parse_args()
 
+    setattr(options, 'access_log', os.path.join(options.log_dir, ACCESS_LOG))
+    setattr(options, 'error_log', os.path.join(options.log_dir, ERROR_LOG))
+
     # Update config.config with the command line values
     # So the whole application will have access to accurate values
     for sec in config.config.sections():
-- 
2.7.4



More information about the Kimchi-devel mailing list