Permalink
Browse files

[logging]: always log to syslog (via the debug module)

Use the main xapi.conf file to disable logging on a per-module basis.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
  • Loading branch information...
1 parent 6be0b6b commit 884840f31e921139bc2e3b21e7b6426e6ac0744b David Scott committed Mar 14, 2012
View
4 OMakefile
@@ -118,9 +118,7 @@ OCAML_PHASE3_XEN = \
ocaml/xapi/sparse_dd \
ocaml/xapi/monitor_fake_plugin \
ocaml/license/v6d \
- ocaml/license/v6d-reopen-logs \
- ocaml/network/xcp-networkd \
- ocaml/network/xcp-networkd-reopen-logs
+ ocaml/network/xcp-networkd
OCAML_PHASE3_NOXEN = \
ocaml/ptoken/genptoken \
View
5 ocaml/database/block_device_io.ml
@@ -118,10 +118,7 @@ exception EndOfDeltas
exception NotEnoughSpace
(* Make informational output go to the syslog *)
-let initialise_logging () =
- List.iter
- (fun level -> Logs.append "block_device_io" level "syslog:xapi_block_device_io")
- [Log.Info; Log.Warn; Log.Error]
+let initialise_logging () = Debug.set_facility Syslog.Local5
(* --------------------------------------------- *)
(* Functions to deal with layout of block device *)
View
3 ocaml/db_process/xapi_db_process.ml
@@ -24,8 +24,7 @@ let config = ref ""
let iqn = ref ""
let xmltostdout = ref false
-let init_logs() =
- Logs.append "xapi-db-process" Log.Info "syslog:xapi_db_process"
+let init_logs() = Debug.set_facility Syslog.Local5
let fatal_error s =
print_string s;
View
2 ocaml/idl/ocaml_backend/gen_rbac.ml
@@ -33,7 +33,7 @@ let internal_role_local_root = "_local_root_"
(* the output of this function is used as input by the automatic tests *)
let writer_csv static_roles_permissions static_permissions_roles =
(Printf.sprintf "%s,PERMISSION/ROLE,%s\n"
- (let t =Log.gettimestring () in (String.sub t 0 ((String.length t)-1)))
+ (let t =Debug.gettimestring () in (String.sub t 0 ((String.length t)-1)))
(* role titles are ordered by roles in roles_all *)
(List.fold_left (fun rr r->rr^r^",") "" Datamodel.roles_all)
)
View
3 ocaml/license/OMakefile
@@ -19,14 +19,11 @@ V6D = v6d
OCamlProgram($(V6D), $(V6FILES))
OCamlDocProgram($(V6D), $(V6FILES))
-OCamlProgram(v6d-reopen-logs, v6d_reopen_logs ../fhs)
-
.PHONY: install
install: $(V6D)
mkdir -p $(DESTDIR)$(LIBEXECDIR)
$(IPROG) $(V6D) $(DESTDIR)$(LIBEXECDIR)
mkdir -p $(DESTDIR)$(OPTDIR)/bin
- $(IPROG) v6d-reopen-logs $(DESTDIR)$(OPTDIR)/bin
.PHONY: clean
clean:
View
9 ocaml/license/fakev6.ml
@@ -31,11 +31,4 @@ let get_editions () =
let get_version () =
""
-let reopen_logs () =
- try
- debug "Reopening logfiles";
- Logs.reopen ();
- debug "Logfiles reopened";
- true
- with _ -> false
-
+let reopen_logs () = true
View
1 ocaml/license/v6daemon.ml
@@ -62,7 +62,6 @@ let watchdog f =
(* parent process blocks sigint and forward sigterm to child. *)
ignore(Unix.sigprocmask Unix.SIG_BLOCK [Sys.sigint]);
Sys.catch_break false;
- Logs.append "watchdog" Log.Info "syslog:v6d_watchdog";
(* watchdog logic *)
let loginfo fmt = W.info fmt in
View
6 ocaml/license/v6testd.ml
@@ -14,7 +14,11 @@
module P = V6rpc.V6process(Fakev6)
+module D=Debug.Debugger(struct let name="v6daemon" end)
+open D
+
let _ =
- Logs.reset_all [ "file:/var/log/v6d.log" ];
+ Debug.set_facility Syslog.Local4;
+ debug "V6testd started";
V6daemon.startup (fun () -> ()) P.process
View
2 ocaml/network/OMakefile
@@ -18,14 +18,12 @@ OCamlLibraryClib(network_utils, network_utils, link_stubs)
OCamlProgram($(NETWORKD), $(NETWORKD_FILES))
OCamlDocProgram($(NETWORKD), $(NETWORKD_FILES))
OCamlProgram($(NETWORK_TEST), ../fhs network_test network_interface)
-OCamlProgram(xcp-networkd-reopen-logs, ../fhs networkd_reopen_logs network_interface)
.PHONY: install
install:
mkdir -p $(DESTDIR)$(LIBEXECDIR)
$(IPROG) $(NETWORKD) $(DESTDIR)$(LIBEXECDIR)
mkdir -p $(DESTDIR)$(OPTDIR)/bin
- $(IPROG) xcp-networkd-reopen-logs $(DESTDIR)$(OPTDIR)/bin
.PHONY: test
test: $(NETWORK_TEST)
View
8 ocaml/network/network_server.ml
@@ -107,13 +107,7 @@ let on_shutdown signal =
let on_timer () =
write_config ()
-let reopen_logs _ () =
- try
- debug "Reopening logfiles";
- Logs.reopen ();
- debug "Logfiles reopened";
- true
- with _ -> false
+let reopen_logs _ () = true
let reset_state _ () =
config := read_management_conf ()
View
4 ocaml/network/networkd.ml
@@ -13,7 +13,6 @@
*)
let name = "xcp-networkd"
-let log_file_path = Printf.sprintf "file:/var/log/%s.log" name
open Pervasiveext
open Fun
@@ -60,6 +59,7 @@ let handle_shutdown () =
let _ =
let pidfile = ref "" in
let daemonize = ref false in
+ Debug.set_facility Syslog.Local5;
Arg.parse (Arg.align [
"-daemon", Arg.Set daemonize, "Create a daemon";
@@ -68,8 +68,6 @@ let _ =
(fun _ -> failwith "Invalid argument")
(Printf.sprintf "Usage: %s [-daemon] [-pidfile filename]" name);
- Logs.reset_all [ log_file_path ];
- Logs.set "http" Log.Debug ["nil"];
debug "%s" (String.concat ", " (Debug.get_all_debug_keys()));
if !daemonize then Unixext.daemonize () else Network_utils.print_debug := true;
View
34 ocaml/network/networkd_reopen_logs.ml
@@ -1,34 +0,0 @@
-(*
- * Copyright (C) Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-(** Small executable that sends a reopen-logs XML/RPC message to the networking daemon *)
-
-open Xmlrpc_client
-
-let make_rpc path =
- let module Rpc = struct
- let transport = ref (Unix path)
- let rpc call =
- XMLRPC_protocol.rpc ~srcstr:"networkd_reopen_logs" ~dststr:"networkd" ~transport:!transport ~http:(xmlrpc ~version:"1.0" "/") call
- end in
- (module Rpc : Network_interface.RPC)
-
-module Rpc = (val (make_rpc (Filename.concat Fhs.vardir "xcp-networkd")) : Network_interface.RPC)
-module Client = Network_interface.Client(Rpc)
-
-let _ =
- try
- ignore (Client.reopen_logs ())
- with
- | _ -> ()
-
View
29 ocaml/xapi/cli_operations.ml
@@ -310,37 +310,18 @@ let create_owner_vbd_and_plug rpc session_id vm vdi device_name bootable rw cd u
CLI Operation Implementation
--------------------------------------------------------------------- *)
-(* Temporary hack for logging *)
+(* NB: all logging is now via syslog. No manual log controls are here. *)
let log_set_output printer _ session_id params =
- let logger = List.assoc "output" params in
- try
- let key = List.assoc "key" params in
- Log.validate logger;
- let level = try List.assoc "level" params with _ -> "all" in
- if level="all" then
- (Logs.add key [logger];
- printer (Cli_printer.PList ["Setting all logging output for key "^key^" to logger: "^logger]))
- else
- (let loglevel = Log.level_of_string level in
- Logs.set key loglevel [logger];
- printer (Cli_printer.PList ["Setting logging output at level "^level^" for key "^key^" to logger: "^logger]))
- with
- | Log.Unknown_level x -> failwith ("Unknown logging level "^x)
- | Not_found ->
- Logs.reset_all [ logger ];
- printer (Cli_printer.PList ["Resetting all logging output to logger: "^logger])
+ ()
let log_get_keys printer _ session_id params =
- let keys = Debug.get_all_debug_keys () in
- printer (Cli_printer.PList keys)
+ ()
let log_get printer _ session_id params =
- let logger = Logs.get_or_open "string" in
- let lines = Log.get_strings logger in
- printer (Cli_printer.PList (List.rev lines))
+ ()
let log_reopen printer _ session_id params =
- Logs.reopen (); ()
+ ()
let string_of_task_status task = match task.API.task_status with
| `pending ->
View
4 ocaml/xapi/xapi.ml
@@ -824,7 +824,6 @@ let server_init() =
Server_helpers.exec_with_new_task "server_init" (fun __context ->
Startup.run ~__context [
"Reading config file", [], (fun () -> Xapi_config.read_config !Xapi_globs.config_file);
- "Reading log config file", [ Startup.NoExnRaising ], (fun () ->Xapi_config.read_log_config !Xapi_globs.log_config_file);
"Reading external global variables definition", [ Startup.NoExnRaising ], Xapi_globs.read_external_config;
"Initing stunnel path", [], Stunnel.init_stunnel_path;
"XAPI SERVER STARTING", [], print_server_starting_message;
@@ -1032,7 +1031,6 @@ let watchdog f =
(* parent process blocks sigint and forward sigterm to child. *)
ignore(Unix.sigprocmask Unix.SIG_BLOCK [Sys.sigint]);
Sys.catch_break false;
- Logs.append "watchdog" Log.Info "syslog:xapi_watchdog";
(* watchdog logic *)
let loginfo fmt = W.info fmt in
@@ -1197,6 +1195,8 @@ tolarence, the next tweak will be %f seconds away at the earliest."
let _ =
+ Debug.set_facility Syslog.Local5;
+
init_args(); (* need to read args to find out whether to daemonize or not *)
if !daemonize then
View
75 ocaml/xapi/xapi_config.ml
@@ -21,76 +21,17 @@ open Stringext
module D=Debug.Debugger(struct let name="xapi" end)
open D
-let clear_log level key =
- let clear_f =
- if key = "" then
- Logs.clear_default
- else
- Logs.clear key in
- if level = "" then (
- List.iter (fun level -> clear_f level)
- [ Log.Error; Log.Warn; Log.Info; Log.Debug ]
- ) else (
- let loglevel = match level with
- | "debug" -> Log.Debug
- | "info" -> Log.Info
- | "warn" -> Log.Warn
- | "error" -> Log.Error
- | s -> failwith (sprintf "Unknown log level: %s" s) in
- clear_f loglevel
- )
-
-let append_log level key logger =
- (* if key is empty, append to the default logger *)
- let append =
- if key = "" then
- Logs.append_default
- else
- Logs.append key in
- (* if level is empty, append to all level *)
- if level = "" then (
- List.iter (fun level -> append level logger)
- [ Log.Error; Log.Warn; Log.Info; Log.Debug ]
- ) else (
- let loglevel = match level with
- | "debug" -> Log.Debug
- | "info" -> Log.Info
- | "warn" -> Log.Warn
- | "error" -> Log.Error
- | s -> failwith (sprintf "Unknown log level: %s" s) in
- append loglevel logger
- )
-
-let read_log_config filename =
- let trim_end lc s =
- let i = ref (String.length s - 1) in
- while !i > 0 && (List.mem s.[!i] lc)
- do
- decr i
- done;
- if !i >= 0 then String.sub s 0 (!i + 1) else ""
- in
- Unixext.readfile_line
- (fun line ->
- let line = trim_end [ ' '; '\t' ] line in
- if String.startswith "#" line then
- ()
- else
- let ls = String.split ~limit:3 ';' line in
- match ls with
- | [ "reset" ] ->
- Logs.reset_all []
- | [ level; key; "clear" ] ->
- clear_log level key
- | [ level; key; logger ] ->
- append_log level key logger
- | _ ->
- ()
- ) filename
-
let read_config filename =
let configargs = [
"use-xenopsd", Config.Set_bool Xapi_globs.use_xenopsd;
+ "disable-logging-for", Config.String
+ (fun x ->
+ try
+ let modules = String.split_f String.isspace x in
+ List.iter Debug.disable modules
+ with e ->
+ error "Processing disabled-logging-for = %s: %s" x (Printexc.to_string e)
+ )
] in
try
Config.read filename configargs (fun _ _ -> ())
View
8 ocaml/xapi/xapi_globs.ml
@@ -202,14 +202,6 @@ let related_to_key = "related_to"
(* Set to true on the P2V server template and the tools SR *)
let xensource_internal = "xensource_internal"
-let logrot_max = ref (1024*16*1024)
-(* CA-12242: use this script because otherwise logrotate has a habit of closing its own fds *)
-(* logrotate is called without a stdin, and when it fork-and-execs gzip, it opens the src *)
-(* getting fd 0, opens the dest getting fd 3, then forks, then dups 0 to 0, dups 3 to 1 and *)
-(* then closes 0 and 3! *)
-let logrot_cmd = Filename.concat Fhs.libexecdir "logrotate.sh"
-let logrot_arg = [ ]
-
(* Error codes for internal storage backends -- these have counterparts in sm.hg/drivers/XE_SR_ERRORCODES.xml *)
let sm_error_ISODconfMissingLocation = 1000
let sm_error_ISOMustHaveISOExtension = 1001
View
20 ocaml/xapi/xapi_periodic_scheduler_init.ml
@@ -32,25 +32,6 @@ let register () =
(* 10 mins if fist point there - to ensure rrd sync happens first *)
if Xapi_fist.reduce_blob_sync_interval then 60.0 *. 10.0 else 7200. in
- let logrotate_func () =
- let dorotate = Mutex.execute Log.mutex
- (fun () ->
- if !Log.filesize > !Xapi_globs.logrot_max then
- (Log.filesize := 0; true)
- else
- false)
- in
- if dorotate
- then
- try
- info "xapi about to invoke logrotate";
- let stdout, stderr = Forkhelpers.execute_command_get_output Xapi_globs.logrot_cmd Xapi_globs.logrot_arg in
- info "Logrotate executed: stdout='%s' stderr='%s'" stdout stderr
- with Forkhelpers.Spawn_internal_error(log,output,err) ->
- error "Logrotate executed with error code: stdout='%s' stderr='%s'" output log;
- ()
- in
-
(* Heartbeat to show the queue is still running - will be more useful when there's less logging! *)
let hb_timer = 3600.0 in (* one hour *)
let hb_func () = debug "Periodic scheduler heartbeat" in
@@ -85,7 +66,6 @@ let register () =
(Xapi_periodic_scheduler.Periodic !Xapi_globs.session_revalidation_interval) session_revalidation_delay session_revalidation_func;
if master then Xapi_periodic_scheduler.add_to_queue "Trying to update subjects' info using external directory service (if any)"
(Xapi_periodic_scheduler.Periodic !Xapi_globs.update_all_subjects_interval) update_all_subjects_delay update_all_subjects_func;
- Xapi_periodic_scheduler.add_to_queue "Logrotate" (Xapi_periodic_scheduler.Periodic !Xapi_globs.logrotate_check_interval) 120.0 logrotate_func;
Xapi_periodic_scheduler.add_to_queue "Periodic scheduler heartbeat" (Xapi_periodic_scheduler.Periodic hb_timer) 240.0 hb_func;
Xapi_periodic_scheduler.add_to_queue "Update monitor configuration" (Xapi_periodic_scheduler.Periodic 3600.0) 3600.0 Monitor_rrds.update_configuration_from_master
View
2 ocaml/xe-cli/rt/OMakefile
@@ -4,7 +4,7 @@ OCAMLPACKS = str xml-light2 log netdev
.SUBDIRS:geneva
-OCamlProgram(test_host, util test_host commands cliops parsers tests testlog networks)
+OCamlProgram(test_host, util test_host commands cliops parsers tests testlog log networks)
OCamlProgram(gtclient, gtmessages gtcomms gtclient)
OCamlProgram(gtserver_linux, gtmessages gtcomms gtlinuxops gtserver_linux)
OCamlProgram(gtserver_win, gtmessages gtcomms gtwindowsops gtserver_win)
View
23 ocaml/license/v6d_reopen_logs.ml → ocaml/xe-cli/rt/log.ml
@@ -1,5 +1,5 @@
(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
+ * Copyright (C) Citrix Systems Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
@@ -11,19 +11,14 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*)
-(** Small executable that sends a reopen-logs XML/RPC message to the licensing daemon *)
-
-let socket = Filename.concat Fhs.vardir "v6"
-(* RPC function for communication with the v6 daemon *)
-let v6rpc xml =
- let open Xmlrpc_client in
- XML_protocol.rpc ~srcstr:"v6d_reopen_logs" ~dststr:"v6d" ~transport:(Unix socket) ~http:(xmlrpc ~version:"1.0" "/") xml
+type level =
+| Error
+| Warn
+| Debug
+| Info
-let _ =
- try
- let request = XMLRPC.To.methodCall "reopen-logs" [] in
- ignore (v6rpc request)
- with
- | _ -> ()
+module D=Debug.Debugger(struct let name="rt" end)
+let log (fmt: ('a, unit, string, 'b) format4) =
+ Printf.kprintf (fun s -> D.info "%s" s) fmt
View
13 ocaml/xe-cli/rt/testlog.ml
@@ -31,14 +31,11 @@ let string_of_result = function
let test_status_flag = ref Success
let ignore_errors = ref false
-let cmdlog = ref (Log.openstring Log.Debug)
-let get_log () =
- Log.get_strings !cmdlog
+let get_log () = []
let reset_log () =
- test_status_flag := Success;
- cmdlog := (Log.openstring Log.Debug)
+ test_status_flag := Success
let log level (fmt: ('a, unit, string, unit) format4) : 'a =
if not !ignore_errors then begin
@@ -47,7 +44,7 @@ let log level (fmt: ('a, unit, string, unit) format4) : 'a =
| Log.Warn,Success -> test_status_flag := Warning
| _ -> ()
end;
- Log.log !cmdlog level fmt
+ Log.log fmt
let set_ignore_errors b = ignore_errors := b
@@ -271,7 +268,7 @@ let output_xenrt filename =
let output_txt fname =
let oc = open_out fname in
Printf.fprintf oc "Test report\n";
- Printf.fprintf oc "Time: %s\n" (Log.gettimestring ());
+ Printf.fprintf oc "Time: %s\n" (Debug.gettimestring ());
Printf.fprintf oc "\n\n";
let printtest t =
@@ -306,7 +303,7 @@ let output_txt fname =
let register_test name test_type class_name description xapi_log pic =
let log = List.rev (get_log ()) in
- let timestamp = Log.gettimestring () in
+ let timestamp = Debug.gettimestring () in
let vm=get_vm_name test_type in
let picurl = testpicurl name vm in
let pic =
View
10 ocaml/xenops/squeezed.ml
@@ -180,11 +180,7 @@ let balance_memory args =
[]
(* val reopen_logs: unit -> unit *)
-let reopen_logs _ =
- debug "Reopening logfiles";
- Logs.reopen ();
- debug "Logfiles reopened";
- []
+let reopen_logs _ = ()
let function_table = [
"echo", (fun x -> x);
@@ -194,7 +190,6 @@ let function_table = [
_transfer_reservation_to_domain, transfer_reservation_to_domain;
_delete_reservation, delete_reservation;
_balance_memory, balance_memory;
- _reopen_logs, reopen_logs;
]
(** Called periodically to look for unbalanced memory and take corrective action *)
@@ -203,6 +198,8 @@ let idle_callback ~xc ~xs () =
then Debug.with_thread_associated "auto-balance" (fun () -> Squeeze_xen.balance_memory ~xc ~xs) ()
let _ =
+ Debug.set_facility Syslog.Local5;
+
let pidfile = ref default_pidfile in
let daemonize = ref false in
@@ -214,7 +211,6 @@ let _ =
(fun _ -> failwith "Invalid argument")
"Usage: squeezed [-daemon] [-pidfile filename]";
- Logs.reset_all [ log_file_path ];
begin
try Xapi_globs.read_external_config ()
with e -> debug "Read global variables config from %s failed: %s. Continue with default setting." Xapi_globs.xapi_globs_conf (Printexc.to_string e)
View
2 ocaml/xenops/xenops.ml
@@ -491,8 +491,6 @@ let do_cmd_parsing subcmd init_pos =
in
let common = [
- "-debug", Arg.Unit (fun () -> Logs.set_default Log.Debug [ "stderr" ]),
- "enable debugging";
"-domid", Arg.Set_int domid, "Domain ID to be built";
]
and setmaxmem_args = [
View
16 ocaml/xenops/xenopsd.ml
@@ -23,7 +23,7 @@ let minor_version = 9
*)
let config_file = ref (Printf.sprintf "/etc/%s.conf" name)
let pidfile = ref (Printf.sprintf "/var/run/%s.pid" name)
-let log_destination = ref "syslog:xenopsd"
+let log_destination = ref "syslog:daemon"
let simulate = ref false
let persist = ref true
let daemon = ref false
@@ -146,16 +146,10 @@ let start (domain_sock, forwarded_sock) process =
) () in
()
-(* val reopen_logs: unit -> unit *)
-let reopen_logs _ =
- debug "Reopening logfiles";
- Logs.reopen ();
- debug "Logfiles reopened";
- []
-
let _ =
- Logs.reset_all [ !log_destination ];
- debug "xenopsd version %d.%d starting" major_version minor_version;
+ Debug.set_facility Syslog.Local5;
+
+ debug "xenopsd version %d.%d starting" major_version minor_version;
Arg.parse (Arg.align [
"-daemon", Arg.Set daemon, "Create a daemon";
@@ -167,8 +161,6 @@ let _ =
(Printf.sprintf "Usage: %s [-daemon] [-pidfile filename]" name);
read_config_file ();
- Logs.reset_all [ !log_destination ];
- Logs.set "http" Log.Debug [ "nil" ];
dump_config_file ();
Sys.set_signal Sys.sigpipe Sys.Signal_ignore;
View
2 scripts/OMakefile
@@ -47,10 +47,8 @@ install:
$(IPROG) init.d-xenopsd $(DESTDIR)/etc/rc.d/init.d/xenopsd
$(IPROG) init.d-management-interface $(DESTDIR)/etc/rc.d/init.d/management-interface
$(IPROG) init.d-genptoken $(DESTDIR)/etc/rc.d/init.d/genptoken
- $(IDATA) squeezed-logrotate $(DESTDIR)/etc/logrotate.d/squeezed
$(IPROG) xe-networkd $(DESTDIR)$(BINDIR)
$(IPROG) init.d-networkd $(DESTDIR)/etc/rc.d/init.d/xcp-networkd
- $(IDATA) networkd-logrotate $(DESTDIR)/etc/logrotate.d/xcp-networkd
$(IPROG) init.d-v6d $(DESTDIR)/etc/rc.d/init.d/v6d
$(IDATA) v6d-logrotate $(DESTDIR)/etc/logrotate.d/v6d
mkdir -p $(DESTDIR)$(ETCDIR)/master.d
View
36 scripts/log.conf
@@ -1,36 +0,0 @@
-reset
-debug;http;nil
-debug;sql;nil
-debug;db_write;nil
-debug;redo_log;nil
-debug;buf_io;nil
-debug;monitor;nil
-debug;db_server;nil
-debug;api_readonly;nil
-info;api_readonly;nil
-#debug;dispatcher;nil
-#debug;sm;nil
-debug;mux;nil
-debug;xapi_event;nil
-debug;locking;nil
-debug;server_io;nil
-debug;server_helpers;nil
-#debug;taskhelper;nil
-#debug;dummytaskhelper;nil
-#debug;sm_exec;nil
-debug;stunnel;nil
-debug;stunnel_cache;nil
-debug;remote_requests;nil
-debug;wlb_reports;nil
-debug;workload_balancing;nil
-
-# Set info,warn,error to log to syslog by default
-info;audit;syslog:local6
-warn;;syslog:xapi
-error;;syslog:xapi
-
-# Also print everything (debug<->error) into xensource.log for easier debugging
-debug;;file:/var/log/xensource.log
-info;;file:/var/log/xensource.log
-warn;;file:/var/log/xensource.log
-error;;file:/var/log/xensource.log
View
7 scripts/logrotate.sh
@@ -1,7 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) Citrix Systems 2008. All rights reserved.
-#
-
-exec 0</dev/null
-exec /usr/sbin/logrotate /etc/logrotate.conf
View
9 scripts/networkd-logrotate
@@ -1,9 +0,0 @@
-/var/log/xcp-networkd.log {
- missingok
- notifempty
- size 30k
- sharedscripts
- postrotate
- /opt/xensource/bin/xcp-networkd-reopen-logs 2> /dev/null > /dev/null || true
- endscript
-}
View
9 scripts/squeezed-logrotate
@@ -1,9 +0,0 @@
-/var/log/squeezed.log {
- missingok
- notifempty
- size 30k
- sharedscripts
- postrotate
- /opt/xensource/bin/squeezed_client reopen-logs 2> /dev/null > /dev/null || true
- endscript
-}
View
2 scripts/v6d-logrotate
@@ -4,6 +4,6 @@
size 30k
sharedscripts
postrotate
- /opt/xensource/bin/v6d-reopen-logs 2> /dev/null > /dev/null || true
+ /usr/bin/killall -HUP syslogd
endscript
}
View
2 scripts/xapi-logrotate
@@ -3,6 +3,6 @@
size 16M
sharedscripts
postrotate
- @BINDIR@/xe log-reopen 2> /dev/null || true
+ /usr/bin/killall -HUP syslogd
endscript
}
View
2 scripts/xapi.conf
@@ -1,4 +1,4 @@
# The xapi config file
use-xenopsd = true
-
+# disable-logging-for = http,foo,bar
View
6 xapi.spec.in
@@ -186,7 +186,6 @@ rm -rf $RPM_BUILD_ROOT
/etc/xapi.d/plugins/iovirt
/etc/xensource/db.conf
/etc/xensource/db.conf.rio
-/etc/xensource/log.conf
/etc/xensource/master.d/01-example
/etc/xensource/master.d/03-mpathalert-daemon
/etc/xensource/pool.conf
@@ -199,7 +198,6 @@ rm -rf $RPM_BUILD_ROOT
@OPTDIR@/bin/mpathalert
@OPTDIR@/bin/perfmon
@OPTDIR@/bin/static-vdis
-@OPTDIR@/bin/v6d-reopen-logs
@OPTDIR@/bin/xapi-autostart-vms
@OPTDIR@/bin/xapi-db-process
@OPTDIR@/bin/xapi-wait-init-complete
@@ -249,7 +247,6 @@ rm -rf $RPM_BUILD_ROOT
@OPTDIR@/libexec/link-vms-by-sr.py
@OPTDIR@/libexec/link-vms-by-sr.pyo
@OPTDIR@/libexec/link-vms-by-sr.pyc
-@OPTDIR@/libexec/logrotate.sh
@OPTDIR@/libexec/logs-download
@OPTDIR@/libexec/lw-force-domain-leave
@OPTDIR@/libexec/mail-alarm
@@ -306,7 +303,6 @@ rm -rf $RPM_BUILD_ROOT
%files squeezed
%defattr(-,root,root,-)
@OPTDIR@/libexec/squeezed
-/etc/logrotate.d/squeezed
/etc/rc.d/init.d/squeezed
@OPTDIR@/bin/squeezed_client
@@ -330,8 +326,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
@OPTDIR@/libexec/xcp-networkd
/etc/rc.d/init.d/xcp-networkd
-@OPTDIR@/bin/xcp-networkd-reopen-logs
-/etc/logrotate.d/xcp-networkd
%files xenops
%defattr(-,root,root,-)

0 comments on commit 884840f

Please sign in to comment.