diff --git a/defaults/main.yml b/defaults/main.yml index ee415a09..5dcd95cb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -317,6 +317,7 @@ nova_service_in_ldap: false nova_libvirtd_listen_tls: 1 nova_libvirtd_listen_tcp: 0 nova_libvirtd_auth_tcp: sasl +nova_libvirtd_debug_log_filters: "3:remote 4:event 3:json 3:rpc" ## Service Names nova_service_names: diff --git a/templates/libvirtd.conf.j2 b/templates/libvirtd.conf.j2 index 5ecf21b1..bd4fb1bc 100644 --- a/templates/libvirtd.conf.j2 +++ b/templates/libvirtd.conf.j2 @@ -1,5 +1,11 @@ # {{ ansible_managed }} +{% if debug | bool %} +# enabling debug mode according to http://wiki.libvirt.org/page/DebugLogs +log_level = 1 +log_filters="{{ nova_libvirtd_debug_log_filters }}" +log_outputs="1:file:/var/log/libvirt/libvirtd.log" +{% endif %} listen_tls = {{ nova_libvirtd_listen_tls }} listen_tcp = {{ nova_libvirtd_listen_tcp }} unix_sock_group = "libvirtd"