summaryrefslogtreecommitdiff
path: root/buildscripts/errorcodes.py
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2020-01-14 18:49:59 +0000
committerevergreen <evergreen@mongodb.com>2020-01-14 18:49:59 +0000
commitd52125a29a1e98e85b0fb1a68e3a93537fef1414 (patch)
tree7b2c3dc750818e48c24bf41d168c977e35ac35ed /buildscripts/errorcodes.py
parent7f4eb5cb12c01a4b8f1383e6e211fb0fbf2a65f0 (diff)
downloadmongo-d52125a29a1e98e85b0fb1a68e3a93537fef1414.tar.gz
SERVER-45443 Logv2 log statements are required to have a unique id
Diffstat (limited to 'buildscripts/errorcodes.py')
-rwxr-xr-xbuildscripts/errorcodes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/buildscripts/errorcodes.py b/buildscripts/errorcodes.py
index d56fadb009a..1cbaba1f04e 100755
--- a/buildscripts/errorcodes.py
+++ b/buildscripts/errorcodes.py
@@ -42,13 +42,15 @@ list_files = False # pylint: disable=invalid-name
def parse_source_files(callback):
"""Walk MongoDB sourcefiles and invoke a callback for each AssertLocation found."""
- quick = [r"assert", r"Exception", r"ErrorCodes::Error"]
+ quick = [r"assert", r"Exception", r"ErrorCodes::Error", r"LOGV2"]
patterns = [
re.compile(r"(?:u|m(?:sg)?)asser(?:t|ted)(?:NoTrace)?\s*\(\s*(\d+)", re.MULTILINE),
re.compile(r"(?:DB|Assertion)Exception\s*[({]\s*(\d+)", re.MULTILINE),
re.compile(r"fassert(?:Failed)?(?:WithStatus)?(?:NoTrace)?(?:StatusOK)?\s*\(\s*(\d+)",
re.MULTILINE),
+ re.compile(r"LOGV2(?:_INFO|_WARNING|_ERROR|_FATAL|_DEBUG)?(?:_OPTIONS)?\s*\(\s*(\d+)",
+ re.MULTILINE),
re.compile(r"ErrorCodes::Error\s*[({]\s*(\d+)", re.MULTILINE)
]