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

Re: [libvirt] Authoritative source for logging filters descriptions ?



On Tue, Jun 04, 2013 at 05:15:26PM +0530, Kashyap Chamarthy wrote:
> Heya,
> 
> So I usually use these two resources, when tracing/debugging:
> 
>   -
> https://www.berrange.com/posts/2011/10/03/troubleshooting-libvirt-with-the-kvm-and-lxc-drivers/
>   - http://libvirt.org/logging.html
> 
> 
> For instance, for filters to know what QMP commands libvirt is sending to QEMU:
> 
> I use:
>         - log_filters="1:qemu_monitor"
> 	- log_outputs="1:file:/var/log/libvirt/libvirtd.log"
> 
> 
> But, from
> https://www.berrange.com/posts/2011/10/03/troubleshooting-libvirt-with-the-kvm-and-lxc-drivers/
> 
> I notice, we could also use these variations of filters QEMU/QMP filters:
> 
> 	# QEMU JSON/QMP monitor commands
>     	- log_filters="1:qemu_monitor_json"
> 
> 	# QEMU text monitor commands
> 	- log_filters="1:qemu_monitor_text"
> 
> 
> Is there any place where these are comprehensively documented, has anything changed from
> what's mentioned in the above blog & the logging wiki page ?
> 
> 
> Furthermore, from /etc/libvirt/libvirtd.conf, I see:
> ===========================================
> [...]
> # Logging filters:
> # A filter allows to select a different logging level for a given category
> # of logs
> # The format for a filter is one of:
> #    x:name
> #    x:+name
> #      where name is a string which is matched against source file name,
> #      e.g., "remote", "qemu", or "util/json", the optional "+" prefix
> #      tells libvirt to log stack trace for each message matching name,
> #      and x is the minimal level where matching messages should be logged:
> #    1: DEBUG
> #    2: INFO
> #    3: WARNING
> #    4: ERROR
> #
> # Multiple filter can be defined in a single @filters, they just need to be
> # separated by spaces.
> #
> # e.g. to only get warning or errors from the remote layer and only errors
> # from the event layer:
> #log_filters="3:remote 4:event"
> [...]
> ===========================================
> 
> Is the above list of strings describe all possible "name" values for filters ?

The 'name' is just a sub-string match against source file names. So to get a
list of valid filter names, just list all source file names.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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