diff options
author | Daniel Moody <daniel.moody@mongodb.com> | 2022-01-18 10:50:03 -0600 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-01-19 18:41:54 +0000 |
commit | 791e18906f2fe4af53beb193529d04755214df07 (patch) | |
tree | 0c8cb86c3452e1d41e6ef448ba414c0868b13f92 /site_scons/site_tools/validate_cache_dir.py | |
parent | 9b908bdab03322fb137a2571269dd8b4743a0d50 (diff) | |
download | mongo-791e18906f2fe4af53beb193529d04755214df07.tar.gz |
SERVER-62712 isolate cachedir error logging to the cache debug file.
Diffstat (limited to 'site_scons/site_tools/validate_cache_dir.py')
-rw-r--r-- | site_scons/site_tools/validate_cache_dir.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/site_scons/site_tools/validate_cache_dir.py b/site_scons/site_tools/validate_cache_dir.py index 2c78fb7deca..ff7e7fe98f9 100644 --- a/site_scons/site_tools/validate_cache_dir.py +++ b/site_scons/site_tools/validate_cache_dir.py @@ -22,7 +22,6 @@ import datetime import json -import logging import os import pathlib import shutil @@ -207,9 +206,11 @@ class CacheDirValidate(SCons.CacheDir.CacheDir): super().CacheDebug(fmt, target, cachefile) def _log(self, msg, log_msg, json_info, realnode, cachefile): - logging.basicConfig(format='%(levelname)s:validate_cachedir: %(message)s') - logging.error(msg) self.CacheDebug(log_msg + cache_debug_suffix, realnode, cachefile) + + # Write the exception and/or error info to the cache debug log file if in use. + if self.debugFP: + self.debugFP.write(msg + '\n') self.CacheDebugJson(json_info, realnode, cachefile) def print_cache_issue(self, node, ex): |