From 7dd973831f9444eb8a2c98a22cde004b2b788ad3 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Mon, 8 May 2023 14:28:30 +0300 Subject: [PATCH 1/3] Remove httpjson from standard handlers --- docs/config_reference.rst | 16 ++-------------- docs/manpage.rst | 2 +- reframe/schemas/config.json | 6 +++--- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/docs/config_reference.rst b/docs/config_reference.rst index a3f5e04749..4d7133aca7 100644 --- a/docs/config_reference.rst +++ b/docs/config_reference.rst @@ -1317,8 +1317,6 @@ The ``httpjson`` log handler This handler sends log records in JSON format to a server using HTTP POST requests. The additional properties for the ``httpjson`` handler are the following: -.. py:attribute:: logging.handlers..httpjson..url - .. py:attribute:: logging.handlers_perflog..httpjson..url :required: Yes @@ -1326,8 +1324,6 @@ The additional properties for the ``httpjson`` handler are the following: The URL to be used in the HTTP(S) request server. -.. py:attribute:: logging.handlers..httpjson..extra_headers - .. py:attribute:: logging.handlers_perflog..httpjson..extra_headers :required: No @@ -1339,8 +1335,6 @@ The additional properties for the ``httpjson`` handler are the following: .. versionadded:: 4.2 -.. py:attribute:: logging.handlers..httpjson..extras - .. py:attribute:: logging.handlers_perflog..httpjson..extras :required: No @@ -1349,8 +1343,6 @@ The additional properties for the ``httpjson`` handler are the following: A set of optional key/value pairs to be passed with each log record to the server. These may depend on the server configuration. -.. py:attribute:: logging.handlers..httpjson..ignore_keys - .. py:attribute:: logging.handlers_perflog..httpjson..ignore_keys :required: No @@ -1380,8 +1372,6 @@ An example configuration of this handler for performance logging is shown here: This handler transmits the whole log record, meaning that all the information will be available and indexable at the remote end. -.. py:attribute:: logging.handlers..httpjson..debug - .. py:attribute:: logging.handlers_perflog..httpjson..debug :required: No @@ -1393,8 +1383,6 @@ This handler transmits the whole log record, meaning that all the information wi .. versionadded:: 4.1 -.. py:attribute:: logging.handlers..httpjson..json_formatter - .. py:attribute:: logging.handlers_perflog..httpjson..json_formatter A callable for converting the log record into JSON. @@ -1406,8 +1394,8 @@ This handler transmits the whole log record, meaning that all the information wi :arg record: The prepared log record. The log record is a simple Python object with all the attributes listed in :attr:`~config.logging.handlers.format`, as well as all the default Python `log record `__ attributes. In addition to those, there is also the special :attr:`__rfm_check__` attribute that contains a reference to the actual test for which the performance is being logged. - :arg extras: Any extra attributes specified in :attr:`~config.logging.handlers..httpjson..extras`. - :arg ignore_keys: The set of keys specified in :attr:`~config.logging.handlers..httpjson..ignore_keys`. + :arg extras: Any extra attributes specified in :attr:`~config.logging.handlers_perflog..httpjson..extras`. + :arg ignore_keys: The set of keys specified in :attr:`~config.logging.handlers_perflog..httpjson..ignore_keys`. ReFrame always adds the default Python log record attributes in this set. :returns: A string representation of the JSON record to be sent to the server or :obj:`None` if the record should not be sent to the server. diff --git a/docs/manpage.rst b/docs/manpage.rst index 2730cdf638..0e29561872 100644 --- a/docs/manpage.rst +++ b/docs/manpage.rst @@ -1338,7 +1338,7 @@ Whenever an environment variable is associated with a configuration option, its ================================== ================== Associated command line option N/A - Associated configuration parameter :attr:`~config.logging.handlers..httpjson..url` + Associated configuration parameter :attr:`~config.logging.handlers_perflog..httpjson..url` ================================== ================== diff --git a/reframe/schemas/config.json b/reframe/schemas/config.json index bee3a273bf..52d982a213 100644 --- a/reframe/schemas/config.json +++ b/reframe/schemas/config.json @@ -415,8 +415,7 @@ {"$ref": "#/defs/filelog_handler"}, {"$ref": "#/defs/graylog_handler"}, {"$ref": "#/defs/stream_handler"}, - {"$ref": "#/defs/syslog_handler"}, - {"$ref": "#/defs/httpjson_handler"} + {"$ref": "#/defs/syslog_handler"} ] } }, @@ -442,7 +441,8 @@ {"$ref": "#/defs/filelog_handler"}, {"$ref": "#/defs/graylog_handler"}, {"$ref": "#/defs/stream_handler"}, - {"$ref": "#/defs/syslog_handler"} + {"$ref": "#/defs/syslog_handler"}, + {"$ref": "#/defs/httpjson_handler"} ] } }, From e822f3347212ce7ed55f480eb497c1b5195ac469 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Tue, 16 May 2023 09:07:43 +0200 Subject: [PATCH 2/3] Remove filelog from standard handlers --- docs/config_reference.rst | 10 ++-------- docs/manpage.rst | 2 +- reframe/schemas/config.json | 1 - 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/docs/config_reference.rst b/docs/config_reference.rst index 4d7133aca7..cfd428f9a6 100644 --- a/docs/config_reference.rst +++ b/docs/config_reference.rst @@ -15,7 +15,7 @@ Even if a configuration object contains a list of other objects, this is not ref For example, by ``systems.partitions.name`` we designate the ``name`` property of any partition object inside the ``partitions`` property of any system object inside the top level ``systems`` object. If we were to use indices, that would be rewritten as ``systems[i].partitions[j].name`` where ``i`` indexes the systems and ``j`` indexes the partitions of the i-th system. For cases, where the objects in a list are not homogeneous, e.g., the logging handlers, we surround the object type with ``..``. -For example, the ``logging.handlers..filelog..name`` syntax designates the ``name`` attribute of the ``filelog`` logging handler. +For example, the ``logging.handlers_perflog..filelog..name`` syntax designates the ``name`` attribute of the ``filelog`` logging handler. .. |schemas/config.json| replace:: ``reframe/schemas/config.json`` .. _schemas/config.json: https://github.com/reframe-hpc/reframe/blob/master/reframe/schemas/config.json @@ -1142,8 +1142,6 @@ This handler is meant primarily for performance logging and logs the performance The additional properties for the ``filelog`` handler are the following: -.. py:attribute:: logging.handlers..filelog..basedir - .. py:attribute:: logging.handlers_perflog..filelog..basedir :required: No @@ -1152,13 +1150,11 @@ The additional properties for the ``filelog`` handler are the following: The base directory of performance data log files. -.. py:attribute:: logging.handlers..filelog..prefix - .. py:attribute:: logging.handlers_perflog..filelog..prefix :required: Yes - This is a directory prefix (usually dynamic), appended to the :attr:`~config.logging.handlers..filelog..basedir`, where the performance logs of a test will be stored. + This is a directory prefix (usually dynamic), appended to the :attr:`~config.logging.handlers_perflog..filelog..basedir`, where the performance logs of a test will be stored. This attribute accepts any of the check-specific `formatting placeholders <#config.logging.handlers_perflog.format>`__. This allows to create dynamic paths based on the current system, partition and/or programming environment a test executes with. For example, a value of ``%(check_system)s/%(check_partition)s`` would generate the following structure of performance log files: @@ -1177,8 +1173,6 @@ The additional properties for the ``filelog`` handler are the following: ... -.. py:attribute:: logging.handlers..filelog..append - .. py:attribute:: logging.handlers_perflog..filelog..append :required: No diff --git a/docs/manpage.rst b/docs/manpage.rst index 0e29561872..cbc103de77 100644 --- a/docs/manpage.rst +++ b/docs/manpage.rst @@ -1445,7 +1445,7 @@ Whenever an environment variable is associated with a configuration option, its ================================== ================== Associated command line option :option:`--perflogdir` - Associated configuration parameter :attr:`~config.logging.handlers..filelog..basedir` + Associated configuration parameter :attr:`~config.logging.handlers_perflog..filelog..basedir` ================================== ================== diff --git a/reframe/schemas/config.json b/reframe/schemas/config.json index 52d982a213..08ad603ecc 100644 --- a/reframe/schemas/config.json +++ b/reframe/schemas/config.json @@ -412,7 +412,6 @@ "items": { "anyOf": [ {"$ref": "#/defs/file_handler"}, - {"$ref": "#/defs/filelog_handler"}, {"$ref": "#/defs/graylog_handler"}, {"$ref": "#/defs/stream_handler"}, {"$ref": "#/defs/syslog_handler"} From b4b859ac28579dc719db74fa25bc882dff9fcc72 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 24 May 2023 23:11:47 +0200 Subject: [PATCH 3/3] Remove Graylog from normal handlers --- docs/config_reference.rst | 8 ++------ docs/manpage.rst | 2 +- reframe/schemas/config.json | 20 +++++++++----------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/docs/config_reference.rst b/docs/config_reference.rst index cfd428f9a6..66f1c0a288 100644 --- a/docs/config_reference.rst +++ b/docs/config_reference.rst @@ -1138,7 +1138,7 @@ The additional properties for the ``file`` handler are the following: The ``filelog`` log handler --------------------------- -This handler is meant primarily for performance logging and logs the performance of a test in one or more files. +This handler is meant for performance logging only and logs the performance of a test in one or more files. The additional properties for the ``filelog`` handler are the following: @@ -1191,11 +1191,9 @@ The additional properties for the ``filelog`` handler are the following: The ``graylog`` log handler --------------------------- -This handler sends log records to a `Graylog `__ server. +This handler is meant for performance logging only and sends log records to a `Graylog `__ server. The additional properties for the ``graylog`` handler are the following: -.. py:attribute:: logging.handlers..graylog..address - .. py:attribute:: logging.handlers_perflog..graylog..address :required: Yes @@ -1203,8 +1201,6 @@ The additional properties for the ``graylog`` handler are the following: The address of the Graylog server defined as ``host:port``. -.. py:attribute:: logging.handlers..graylog..extras - .. py:attribute:: logging.handlers_perflog..graylog..extras :required: No diff --git a/docs/manpage.rst b/docs/manpage.rst index cbc103de77..c2173430e7 100644 --- a/docs/manpage.rst +++ b/docs/manpage.rst @@ -1321,7 +1321,7 @@ Whenever an environment variable is associated with a configuration option, its ================================== ================== Associated command line option N/A - Associated configuration parameter :attr:`~config.logging.handlers..graylog..address` + Associated configuration parameter :attr:`~config.logging.handlers_perflog..graylog..address` ================================== ================== diff --git a/reframe/schemas/config.json b/reframe/schemas/config.json index 08ad603ecc..d2bb4551db 100644 --- a/reframe/schemas/config.json +++ b/reframe/schemas/config.json @@ -423,11 +423,9 @@ "items": { "anyOf": [ {"$ref": "#/defs/file_handler"}, - {"$ref": "#/defs/filelog_handler"}, {"$ref": "#/defs/graylog_handler"}, {"$ref": "#/defs/stream_handler"}, - {"$ref": "#/defs/syslog_handler"}, - {"$ref": "#/defs/httpjson_handler"} + {"$ref": "#/defs/syslog_handler"} ] }, "minItems": 1 @@ -565,17 +563,17 @@ "logging/handlers*/file_append": false, "logging/handlers*/file_name": "", "logging/handlers*/file_timestamp": false, - "logging/handlers*/filelog_append": true, - "logging/handlers*/filelog_basedir": "./perflogs", - "logging/handlers*/graylog_extras": {}, - "logging/handlers*/httpjson_extras": {}, - "logging/handlers*/httpjson_ignore_keys": [], - "logging/handlers*/httpjson_json_formatter": null, - "logging/handlers*/httpjson_extra_headers": {}, - "logging/handlers*/httpjson_debug": false, "logging/handlers*/stream_name": "stdout", "logging/handlers*/syslog_socktype": "udp", "logging/handlers*/syslog_facility": "user", + "logging/handlers_perflog/filelog_append": true, + "logging/handlers_perflog/filelog_basedir": "./perflogs", + "logging/handlers_perflog/graylog_extras": {}, + "logging/handlers_perflog/httpjson_extras": {}, + "logging/handlers_perflog/httpjson_ignore_keys": [], + "logging/handlers_perflog/httpjson_json_formatter": null, + "logging/handlers_perflog/httpjson_extra_headers": {}, + "logging/handlers_perflog/httpjson_debug": false, "modes/options": [], "modes/target_systems": ["*"], "systems/descr": "",