Skip to content

Commit 94cf560

Browse files
ekoutsvkarak
authored andcommitted
Move log_sanity_results to logger instead of handlers
1 parent ec1015a commit 94cf560

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

reframe/core/logging.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ def _create_httpjson_handler(site_config, config_prefix):
604604
debug = site_config.get(f'{config_prefix}/debug')
605605
backoff_intervals = site_config.get(f'{config_prefix}/backoff_intervals')
606606
retry_timeout = site_config.get(f'{config_prefix}/retry_timeout')
607-
log_sanity_results = site_config.get(f'{config_prefix}/log_sanity_results')
608607

609608
parsed_url = urllib.parse.urlparse(url)
610609
if parsed_url.scheme not in {'http', 'https'}:
@@ -647,7 +646,7 @@ def _create_httpjson_handler(site_config, config_prefix):
647646

648647
return HTTPJSONHandler(url, extras, ignore_keys, json_formatter,
649648
extra_headers, debug, backoff_intervals,
650-
retry_timeout, log_sanity_results)
649+
retry_timeout)
651650

652651

653652
def _record_to_json(record, extras, ignore_keys):
@@ -698,8 +697,7 @@ class HTTPJSONHandler(logging.Handler):
698697

699698
def __init__(self, url, extras=None, ignore_keys=None,
700699
json_formatter=None, extra_headers=None,
701-
debug=False, backoff_intervals=(1, 2, 3), retry_timeout=0,
702-
log_sanity_results=False):
700+
debug=False, backoff_intervals=(1, 2, 3), retry_timeout=0):
703701
super().__init__()
704702
self._url = url
705703
self._extras = extras
@@ -725,7 +723,6 @@ def __init__(self, url, extras=None, ignore_keys=None,
725723
self._debug = debug
726724
self._timeout = retry_timeout
727725
self._backoff_intervals = backoff_intervals
728-
self._log_sanity_results = log_sanity_results
729726

730727
def emit(self, record):
731728
# Convert tags to a list to make them JSON friendly

reframe/frontend/executors/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ def __init__(self, case, listeners=None, timeout=None):
235235
self._perflog_compat = runtime.runtime().get_option(
236236
'logging/0/perflog_compat'
237237
)
238+
self._log_sanity_results = runtime.runtime().get_option(
239+
'logging/0/log_sanity_results'
240+
)
238241

239242
def duration(self, phase):
240243
# Treat pseudo-phases first

reframe/schemas/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@
181181
"type": "array",
182182
"items": {"type": "number"}
183183
},
184-
"log_sanity_results": {"type": "boolean"},
185184
"retry_timeout": {"type": "number"}
186185
},
187186
"required": ["url"]
@@ -441,6 +440,7 @@
441440
"properties": {
442441
"level": {"$ref": "#/defs/loglevel"},
443442
"perflog_compat": {"type": "boolean"},
443+
"log_sanity_results": {"type": "boolean"},
444444
"handlers": {
445445
"type": "array",
446446
"items": {
@@ -622,6 +622,7 @@
622622
"general/verbose": 0,
623623
"logging/level": "undefined",
624624
"logging/perflog_compat": false,
625+
"logging/log_sanity_results": false,
625626
"logging/target_systems": ["*"],
626627
"logging/handlers": [],
627628
"logging/handlers_perflog": [],
@@ -648,7 +649,6 @@
648649
"logging/handlers_perflog/httpjson_extra_headers": {},
649650
"logging/handlers_perflog/httpjson_debug": false,
650651
"logging/handlers_perflog/httpjson_backoff_intervals": [0.1, 0.2, 0.4, 0.8, 1.6, 3.2],
651-
"logging/handlers_perflog/httpjson_log_sanity_results": false,
652652
"logging/handlers_perflog/httpjson_retry_timeout": 0,
653653
"modes/options": [],
654654
"modes/target_systems": ["*"],

0 commit comments

Comments
 (0)