Re: [PATCH] virtlogd: make max file size & number of backups configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01.07.2016 18:43, Daniel P. Berrange wrote:
> Currently virtlogd has a hardcoded max file size of 128kb
> and max of 3 backups. This adds two new config parameters
> to /etc/libvirt/virtlogd.conf to let these be customized.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/logging/log_daemon.c         | 17 +++++++++++++----
>  src/logging/log_daemon_config.c  |  5 +++++
>  src/logging/log_daemon_config.h  |  3 +++
>  src/logging/log_handler.c        | 27 ++++++++++++++++++---------
>  src/logging/log_handler.h        |  4 ++++
>  src/logging/test_virtlogd.aug.in |  4 ++++
>  src/logging/virtlogd.aug         |  2 ++
>  src/logging/virtlogd.conf        |  8 ++++++++
>  8 files changed, 57 insertions(+), 13 deletions(-)
> 


> diff --git a/src/logging/test_virtlogd.aug.in b/src/logging/test_virtlogd.aug.in
> index b12f676..792a5b8 100644
> --- a/src/logging/test_virtlogd.aug.in
> +++ b/src/logging/test_virtlogd.aug.in
> @@ -2,9 +2,13 @@ module Test_virtlogd =
>    let conf = "log_level = 3
>  log_filters=\"3:remote 4:event\"
>  log_outputs=\"3:syslog:virtlogd\"
> +max_size = 131072
> +max_backups = 3
>  "
>  
>     test Virtlogd.lns get conf =
>          { "log_level" = "3" }
>          { "log_filters" = "3:remote 4:event" }
>          { "log_outputs" = "3:syslog:virtlogd" }
> +	{ "max_size" = "131072" }
> +	{ "max_backups" = "3" }
> diff --git a/src/logging/virtlogd.aug b/src/logging/virtlogd.aug
> index eefba5b..da480fd 100644
> --- a/src/logging/virtlogd.aug
> +++ b/src/logging/virtlogd.aug
> @@ -29,6 +29,8 @@ module Virtlogd =
>                       | str_entry "log_outputs"
>                       | int_entry "log_buffer_size"
>                       | int_entry "max_clients"
> +		     | int_entry "max_size"
> +		     | int_entry "max_backups"
>  
>     (* Each enty in the config is one of the following three ... *)
>     let entry = logging_entry


ACK, but please expand & align those TABs in both chunks ^^.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]