From 8d349698c465d5c1fa0627389accbc60778a64de Mon Sep 17 00:00:00 2001 From: Nick Nicholas Date: Tue, 17 Sep 2024 11:23:31 +1000 Subject: [PATCH] filtering error log: https://github.com/metanorma/metanorma-utils/issues/34 --- author/ref/document-attributes.adoc | 7 +++++++ author/topics/output/validation.adoc | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/author/ref/document-attributes.adoc b/author/ref/document-attributes.adoc index ff1005bd..8e28df89 100644 --- a/author/ref/document-attributes.adoc +++ b/author/ref/document-attributes.adoc @@ -24,6 +24,13 @@ Suppress document validation. Terms (and symbols) are indexed automatically in postprocessing. See link:/author/topics/document-format/xrefs/#auto-index-terms[automatic reference lookup]. [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v1.11.3] +`:log-filter-severity:`:: +Filter from error log all warnings at the given severity level or above it. [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v2.9.7] + +`:log-filter-category:`:: +Filter from error log all warnings belonging to one of the named categories; comma-delimited. [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v2.9.7] + + == Reference lookup For bibliographic lookup, see link:/author/topics/building/reference-lookup[automatic reference lookup]. diff --git a/author/topics/output/validation.adoc b/author/topics/output/validation.adoc index 26bfcc1e..1f8bb571 100644 --- a/author/topics/output/validation.adoc +++ b/author/topics/output/validation.adoc @@ -32,6 +32,17 @@ are also output to console. To date, these are applicable to all flavours of Met Severity 3 errors, by contrast, are information-only warnings. You must address severity 0 errors, to get documents to compile at all, and you should also address severity 1 errors. +The error file can get quite large, and it is possible to filter certain classes of log message from the error log. +In order not to log messages from a given severity level up, use the document attribute `:log-filter-severity:`; +in order to log messages from one or more categories, use the document attribute `:log-filter-category:`, with the +categories to exclude comma-delimited [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v2.9.7]. + +[source,asciidoc] +---- +:log-filter-severity: 3 +:log-filter-category: Crossreferences,Document Attributes,Metanorma XML Syntax +---- + Error classes include the following: