1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

conf: add log/command_log_{sort,cols} config settings

This commit is contained in:
Peter Rajnoha 2016-06-14 13:10:29 +02:00
parent 99c2a2b960
commit c36d4632a6
4 changed files with 31 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.158 -
=================================
Add log/command_log_{sort,cols} to lvm.conf to configure command log report.
Add log_object_{type,name,id,group,group_id} fields to cmd log.
Add log_{seq_num,type,context,message,errno,ret_code} fields to cmd log.
Add CMDLOG report type - a separate report type for command logging.

View File

@ -478,6 +478,22 @@ allocation {
# How LVM log information is reported.
log {
# Configuration option log/command_log_sort.
# List of columns to sort by when reporting command log.
# Possible fields are: log_seq_num, log_type, log_context, log_object_type,
# log_object_name, log_object_id, log_object_group, log_object_group_id,
# log_message, log_errno, log_ret_code.
# This configuration option has an automatic default value.
# command_log_sort = "log_seq_num"
# Configuration option log/command_log_cols.
# List of columns to report when reporting command log.
# Possible fields are: log_seq_num, log_type, log_context, log_object_type,
# log_object_name, log_object_id, log_object_group, log_object_group_id,
# log_message, log_errno, log_ret_code.
# This configuration option has an automatic default value.
# command_log_cols = "log_seq_num,log_type,log_context,log_object_type,log_object_name,log_object_id,log_object_group,log_object_group_id,log_message,log_errno,log_ret_code"
# Configuration option log/verbose.
# Controls the messages sent to stdout or stderr.
verbose = 0

View File

@ -547,6 +547,18 @@ cfg_runtime(allocation_thin_pool_chunk_size_CFG, "thin_pool_chunk_size", allocat
cfg(allocation_physical_extent_size_CFG, "physical_extent_size", allocation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_EXTENT_SIZE, vsn(2, 2, 112), NULL, 0, NULL,
"Default physical extent size in KiB to use for new VGs.\n")
cfg(log_command_log_sort_CFG, "command_log_sort", log_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_COMMAND_LOG_SORT, vsn(2, 2, 158), NULL, 0, NULL,
"List of columns to sort by when reporting command log.\n"
"Possible fields are: log_seq_num, log_type, log_context, log_object_type,\n"
"log_object_name, log_object_id, log_object_group, log_object_group_id,\n"
"log_message, log_errno, log_ret_code.\n")
cfg(log_command_log_cols_CFG, "command_log_cols", log_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_COMMAND_LOG_COLS, vsn(2, 2, 158), NULL, 0, NULL,
"List of columns to report when reporting command log.\n"
"Possible fields are: log_seq_num, log_type, log_context, log_object_type,\n"
"log_object_name, log_object_id, log_object_group, log_object_group_id,\n"
"log_message, log_errno, log_ret_code.\n")
cfg(log_verbose_CFG, "verbose", log_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_VERBOSE, vsn(1, 0, 0), NULL, 0, NULL,
"Controls the messages sent to stdout or stderr.\n")

View File

@ -963,8 +963,8 @@ static int _config_report(struct cmd_context *cmd, struct report_args *args)
args->options = find_config_tree_str(cmd, report_pvsegs_cols_verbose_CFG, NULL);
break;
case CMDLOG:
args->keys = DEFAULT_COMMAND_LOG_SORT;
args->options = DEFAULT_COMMAND_LOG_COLS;
args->keys = find_config_tree_str(cmd, log_command_log_sort_CFG, NULL);
args->options = find_config_tree_str(cmd, log_command_log_cols_CFG, NULL);
break;
default:
log_error(INTERNAL_ERROR "_report: unknown report type.");