]> xenbits.xensource.com Git - xen.git/commitdiff
oxenstored: honour XEN_LOG_DIR defined by configure
authorWei Liu <wei.liu2@citrix.com>
Mon, 13 Jun 2016 07:49:01 +0000 (08:49 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 14 Jun 2016 13:31:27 +0000 (14:31 +0100)
We generate a corresponding constant (in lower case) in paths.ml. Use
that in source code to get rid of hard-coded path.

Note that with this patch the default location for xenstored*.log is
changed from /var/log to /var/log/xen.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: David Scott <dave@recoil.org>
tools/ocaml/xenstored/logging.ml

index 4c9003264abb67400bdfa6325a7ccf922da6322b..c52f03dd17a906e5c7ff1a944ca02dfa5ef8ebce 100644 (file)
@@ -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