diff mbox

[03/17] oxenstored: honour XEN_LOG_DIR defined by configure

Message ID 1465804155-14469-4-git-send-email-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu June 13, 2016, 7:49 a.m. UTC
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 <wei.liu2@citrix.com>
Acked-by: David Scot <dave@recoil.org>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: David Scot <dave@recoil.org>
---
 tools/ocaml/xenstored/logging.ml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrew Cooper June 13, 2016, 10:07 a.m. UTC | #1
On 13/06/16 08:49, Wei Liu wrote:
> 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 <wei.liu2@citrix.com>
> Acked-by: David Scot <dave@recoil.org>

You have dropped a 't'.

You should also note in the commit message that this alters where
oxenstored puts its log files.

~Andrew
Wei Liu June 13, 2016, 10:34 a.m. UTC | #2
On Mon, Jun 13, 2016 at 11:07:19AM +0100, Andrew Cooper wrote:
> On 13/06/16 08:49, Wei Liu wrote:
> > 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 <wei.liu2@citrix.com>
> > Acked-by: David Scot <dave@recoil.org>
> 
> You have dropped a 't'.
> 

Oops, yes -- and I c&p this to various other patch. Sorry Dave.

I will fix this.

> You should also note in the commit message that this alters where
> oxenstored puts its log files.
> 

Ack.

Wei.

> ~Andrew
diff mbox

Patch

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