From patchwork Mon Jun 13 07:49:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9172247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5F593604DB for ; Mon, 13 Jun 2016 07:51:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51F9920499 for ; Mon, 13 Jun 2016 07:51:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46A6B2665D; Mon, 13 Jun 2016 07:51:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E769422230 for ; Mon, 13 Jun 2016 07:51:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCMcc-0005vB-NS; Mon, 13 Jun 2016 07:49:22 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCMca-0005tQ-Qn for xen-devel@lists.xenproject.org; Mon, 13 Jun 2016 07:49:20 +0000 Received: from [85.158.139.211] by server-7.bemta-5.messagelabs.com id 7C/25-10476-0856E575; Mon, 13 Jun 2016 07:49:20 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeJIrShJLcpLzFFi42JxWrrBXrc+NS7 coG+rusX3LZOZHBg9Dn+4whLAGMWamZeUX5HAmnFyQh9zwVOuik/ffzI3MK7h7GLk5JAQ8Jc4 2n6bHcRmE1CW+NnZywZiiwjoSTQdeM4IYjMLZEpM+3SSpYuRg0NYwEviVBs3SJhFQFXi551Ws HJeAWeJS3uaGSFGykmcP/6TGaScU8BF4sk7c5CwEFBJw6zDzBC2gkTH9GNMEK2CEidnPmGB2C QhcfDFC2aIMdwSt09PZZ7AyDcLSdksJGULGJlWMWoUpxaVpRbpGprqJRVlpmeU5CZm5ugaGpj q5aYWFyemp+YkJhXrJefnbmIEBhQDEOxgbNjueYhRkoNJSZRXwicuXIgvKT+lMiOxOCO+qDQn tfgQowwHh5IE79ZkoJxgUWp6akVaZg4wtGHSEhw8SiK810HSvMUFibnFmekQqVOMilLivI9AE gIgiYzSPLg2WDxdYpSVEuZlBDpEiKcgtSg3swRV/hWjOAejkjDvAZApPJl5JXDTXwEtZgJazL EvGmRxSSJCSqqBcUbNjKDDvw4tuvVytev3JX863bLEgnfkfXUUWXz+fqyAysR6m/rUr79urZT bMGPmNrnsJxK/7F9sFvgX63TIePZh+VSrhwZ3W54WRaQWJR3RLfP9zBr08Pgqq4MxgafvfL+6 4vKt/N3ZU2VvzZYwf/mFNy8t79VmoyU/JkWxlE3Zo34+VbF3UY0SS3FGoqEWc1FxIgDc0jLGo gIAAA== X-Env-Sender: prvs=9655a08af=wei.liu2@citrix.com X-Msg-Ref: server-14.tower-206.messagelabs.com!1465804158!8129685!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 25624 invoked from network); 13 Jun 2016 07:49:19 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-14.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 13 Jun 2016 07:49:19 -0000 X-IronPort-AV: E=Sophos;i="5.26,466,1459814400"; d="scan'208";a="366840722" From: Wei Liu To: Xen-devel Date: Mon, 13 Jun 2016 08:49:01 +0100 Message-ID: <1465804155-14469-4-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1465804155-14469-1-git-send-email-wei.liu2@citrix.com> References: <1465804155-14469-1-git-send-email-wei.liu2@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson , Wei Liu , David Scot Subject: [Xen-devel] [PATCH 03/17] oxenstored: honour XEN_LOG_DIR defined by configure X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP We generate a corresponding constant (in lower case) in paths.ml. Use that in source code to get rid of hard-coded path. Signed-off-by: Wei Liu Acked-by: David Scot --- Cc: Ian Jackson Cc: David Scot --- tools/ocaml/xenstored/logging.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/xenstored/logging.ml b/tools/ocaml/xenstored/logging.ml index 4c90032..c52f03d 100644 --- a/tools/ocaml/xenstored/logging.ml +++ b/tools/ocaml/xenstored/logging.ml @@ -154,7 +154,7 @@ let make_syslog_logger facility = Syslog.log facility level s in { stop = nothing; restart = nothing; rotate = nothing; write=write } -let xenstored_log_destination = ref (File "/var/log/xenstored.log") +let xenstored_log_destination = ref (File (Paths.xen_log_dir ^ "/xenstored.log")) let xenstored_log_level = ref Warn let xenstored_log_nb_files = ref 10 let xenstored_log_nb_lines = ref 13215 @@ -262,7 +262,7 @@ let sanitize_data data = String.escaped data let activate_access_log = ref true -let access_log_destination = ref (File "/var/log/xenstored-access.log") +let access_log_destination = ref (File (Paths.xen_log_dir ^ "/xenstored-access.log")) let access_log_nb_files = ref 20 let access_log_nb_lines = ref 13215 let access_log_nb_chars = ref 180