mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 08:05:24 +00:00
9b80e0c12a
The log filters have supported the use of a "+" before the source match
string to request that a stack trace be emitted for every log message:
commit 548563956e
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Wed May 9 15:18:56 2012 +0100
Allow stack traces to be included with log messages
Sometimes it is useful to see the callpath for log messages.
This change enhances the log filter syntax so that stack traces
can be show by setting '1:+NAME' instead of '1:NAME'.
With the huge & ever increasing number of logging statements per file,
this will be incredibly verbose and have a major performance penalty.
This makes the feature impractical to use widely and as such it is not
worth the code maint cost.
Removing this seldom used feature allows us to drop the 'execinfo'
module in gnulib which provides the backtrace() function which doesn't
exist on non-Linux.
Users who want to get stack traces of parts of libvirt can use GDB,
or systemtap for live tracing with minimal perf impact.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
100 lines
3.3 KiB
Plaintext
100 lines
3.3 KiB
Plaintext
# Master virtlogd daemon configuration file
|
|
#
|
|
|
|
#################################################################
|
|
#
|
|
# Logging controls
|
|
#
|
|
|
|
# Logging level: 4 errors, 3 warnings, 2 information, 1 debug
|
|
# basically 1 will log everything possible
|
|
#
|
|
# WARNING: USE OF THIS IS STRONGLY DISCOURAGED.
|
|
#
|
|
# WARNING: It outputs too much information to practically read.
|
|
# WARNING: The "log_filters" setting is recommended instead.
|
|
#
|
|
# WARNING: Journald applies rate limiting of messages and so libvirt
|
|
# WARNING: will limit "log_level" to only allow values 3 or 4 if
|
|
# WARNING: journald is the current output.
|
|
#
|
|
# WARNING: USE OF THIS IS STRONGLY DISCOURAGED.
|
|
#log_level = 3
|
|
|
|
# Logging filters:
|
|
# A filter allows to select a different logging level for a given category
|
|
# of logs. The format for a filter is:
|
|
#
|
|
# level:match
|
|
#
|
|
# where 'match' is a string which is matched against the category
|
|
# given in the VIR_LOG_INIT() at the top of each libvirt source
|
|
# file, e.g., "remote", "qemu", or "util.json". The 'match' in the
|
|
# filter matches using shell wildcard syntax (see 'man glob(7)').
|
|
# The 'match' is always treated as a substring match. IOW a match
|
|
# string 'foo' is equivalent to '*foo*'.
|
|
#
|
|
# 'level' is the minimal level where matching messages should
|
|
# be logged:
|
|
#
|
|
# 1: DEBUG
|
|
# 2: INFO
|
|
# 3: WARNING
|
|
# 4: ERROR
|
|
#
|
|
# Multiple filters can be defined in a single @log_filters, they just need
|
|
# to be separated by spaces. Note that libvirt performs "first" match, i.e.
|
|
# if there are concurrent filters, the first one that matches will be applied,
|
|
# given the order in @log_filters.
|
|
#
|
|
# For the virtlogd daemon, a typical need is to capture information
|
|
# from the logging code and some of the utility code. Some utility
|
|
# code is very verbose and is generally not desired. A suitable filter
|
|
# string for debugging might be to turn off object, json & event logging,
|
|
# but enable the rest of the util and the logging code:
|
|
#
|
|
#log_filters="1:logging 4:object 4:json 4:event 1:util"
|
|
|
|
# Logging outputs:
|
|
# An output is one of the places to save logging information
|
|
# The format for an output can be:
|
|
# level:stderr
|
|
# output goes to stderr
|
|
# level:syslog:name
|
|
# use syslog for the output and use the given name as the ident
|
|
# level:file:file_path
|
|
# output to a file, with the given filepath
|
|
# level:journald
|
|
# output to journald logging system
|
|
# In all cases 'level' is the minimal priority, acting as a filter
|
|
# 1: DEBUG
|
|
# 2: INFO
|
|
# 3: WARNING
|
|
# 4: ERROR
|
|
#
|
|
# Multiple outputs can be defined, they just need to be separated by spaces.
|
|
# e.g. to log all warnings and errors to syslog under the virtlogd ident:
|
|
#log_outputs="3:syslog:virtlogd"
|
|
#
|
|
|
|
# The maximum number of concurrent client connections to allow
|
|
# on primary socket
|
|
#max_clients = 1024
|
|
|
|
# The maximum number of concurrent client connections to allow
|
|
# on administrative socket
|
|
#admin_max_clients = 5
|
|
|
|
# Maximum file size before rolling over. Defaults to 2 MB
|
|
#
|
|
# Beware that a logrotate config file might be installed too,
|
|
# to handle cases where virtlogd is disabled. To ensure that
|
|
# the logrotate config is a no-op when virtlogd is running,
|
|
# make sure that max_size here is smaller than size listed
|
|
# in the logrotate config.
|
|
#max_size = 2097152
|
|
|
|
# Maximum number of backup files to keep. Defaults to 3,
|
|
# not including the primary active file
|
|
#max_backups = 3
|