]> sourceware.org Git - lvm2.git/commit
log: log warnings and errors via report if set; add log_set_report* fns
authorPeter Rajnoha <prajnoha@redhat.com>
Tue, 3 May 2016 09:46:52 +0000 (11:46 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Mon, 20 Jun 2016 09:33:42 +0000 (11:33 +0200)
commit7d4a15e53a19dcc073b7037638d811eba3a85edf
treed78dbc3be0dbc06729699d1f57010c9f2b71612b
parent8cfc385491484e71d66e5991e09c3d0a47570a13
log: log warnings and errors via report if set; add log_set_report* fns

This patch adds structures and functions to reroute error and warning
logs to log report, if it's set.

There are 5 new functions:
  - log_set_report
    Set log report where logging will be rerouted.

  - log_set_report_context
    Set context globally so any report_cmdlog call will use it.

  - log_set_report_object_type
    Set object type globally so any report_cmdlog call will use it.

  - log_set_report_object_name_and_id
    Set object ID and name globally so any report_cmdlog call will use it.

  - log_set_report_object_group_and_group_id
    Set object group ID and name globally so any report_cmdlog call will use it.

These functions will be called during LVM command processing so any logs
which are rerouted to log report contain proper information about current
processing state.
WHATS_NEW
lib/log/log.c
lib/log/lvm-logging.h
lib/report/report.h
tools/reporter.c
tools/toollib.c
tools/toollib.h
This page took 0.038616 seconds and 5 git commands to generate.