[PATCH 1/2] fwts: framework: Add --log-level option

Alex Hung alex.hung at canonical.com
Tue Dec 15 02:10:13 UTC 2015


On 2015-12-10 08:20 PM, Colin King wrote:
> From: Colin Ian King<colin.king at canonical.com>
>
> Allow users to specify a log error level threshold, option is:
>
> --log-level=[critical|high|medium|low|info|all]
>
> where the level specifies the log level and above to log. For example,
> 'critical' just logs failures of level critical,  'medium' logs failures
> of medium, high and critical, 'all' log all failures.  Note that the
> 'all' level is identical to 'info'.  The change includes:
>
> 1) Changes to the logging to pass the entire fwts_framework rather than
>     the log to be able to filter out at the lowest log level.
> 2) Filtering at the error accounting level, so we only account for
>     errors at the given log level or above
> 3) Filtering at the summary information, again, so we only account for
>     errord at the given log level or above
>
> Signed-off-by: Colin Ian King<colin.king at canonical.com>
> ---
>   doc/fwts.1                       |  7 ++++++
>   src/lib/include/fwts_framework.h |  9 ++++++-
>   src/lib/include/fwts_log.h       | 31 ++++++++++++-----------
>   src/lib/src/fwts_framework.c     | 54 ++++++++++++++++++++++++++++++++++++----
>   src/lib/src/fwts_log.c           |  9 +++++--
>   src/lib/src/fwts_summary.c       | 16 ++++++++++--
>   6 files changed, 101 insertions(+), 25 deletions(-)
>
> diff --git a/doc/fwts.1 b/doc/fwts.1
> index edefc0b..e299b26 100644
> --- a/doc/fwts.1
> +++ b/doc/fwts.1
> @@ -177,6 +177,13 @@ specify the information in each log line. The following specifiers are available
>   .br
>   e.g. \-\-log\-format="%date %time [%field] (%owner): "
>   .TP
> +.B \-\-log\-level [critical|high|medium|low|info|all]

Did you miss a "=" here? for example, it should be
+.B \-\-log\-level=[critical|high|medium|low|info|all]


-- 
Cheers,
Alex Hung



More information about the fwts-devel mailing list