From 96ddccbfe6ec7f3a4054aa8144eebd5a43d4028d Mon Sep 17 00:00:00 2001 From: Stas Date: Wed, 26 Nov 2025 20:17:22 +0300 Subject: [PATCH 1/3] added auth_log_severity field to the Buddy reply --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2b84d880..ebda51b4 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,7 @@ The response JSON structure: | `error_code` | An integer representing the HTTP error code which will be a part of the HTTP response to the user making a JSON over HTTP request. For SQL over HTTP/mysql communications, this field is ignored. | | `version` | Indicates the current protocol version being used. Current version is 3. | | `content_type` | Optional string that defines the Content-Type header value for the reply to the client. | +| `auth_log_severity` | Optional string. Defines the severity level at which the message (from the message property) should be logged in the dedicated authentication log [searchd.log.auth](https://github.com/manticoresoftware/manticoresearch/blob/wip_auth/src/auth/spec.md#logging). This flag is used when the error is related to authentication or permission enforcement. The value must be one of the daemon's supported log levels: INFO, WARN, ERROR, or CRITICAL. If this key is omitted, no entry will be added to the authentication log. Example of HTTP Response: From 156619281563bf3f28aa5ef7795bde1e099feb34 Mon Sep 17 00:00:00 2001 From: Stas Date: Thu, 27 Nov 2025 13:29:26 +0300 Subject: [PATCH 2/3] changed auth log message to be an object with array items --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ebda51b4..99c0b338 100644 --- a/README.md +++ b/README.md @@ -216,8 +216,15 @@ The response JSON structure: | `error_code` | An integer representing the HTTP error code which will be a part of the HTTP response to the user making a JSON over HTTP request. For SQL over HTTP/mysql communications, this field is ignored. | | `version` | Indicates the current protocol version being used. Current version is 3. | | `content_type` | Optional string that defines the Content-Type header value for the reply to the client. | -| `auth_log_severity` | Optional string. Defines the severity level at which the message (from the message property) should be logged in the dedicated authentication log [searchd.log.auth](https://github.com/manticoresoftware/manticoresearch/blob/wip_auth/src/auth/spec.md#logging). This flag is used when the error is related to authentication or permission enforcement. The value must be one of the daemon's supported log levels: INFO, WARN, ERROR, or CRITICAL. If this key is omitted, no entry will be added to the authentication log. +| `log` | Optional array of log objects. Used to instruct the Manticore daemon to write specific events to its internal logs. If omitted, no special logging occurs. +##### Log Array Structure Details + +| Key | Value | Description | +|-|-|-| +| `type` | `auth` | Specifies which log file/system the event should be written to. `auth` directs the event to the dedicated authentication `searchd.log.auth`. +| `severity` | `INFO`, `WARN`, `ERROR`, `CRITICAL` | The severity level at which the message should be logged. Must be one of the daemon's supported log levels. +| `message` | String | The detailed, human-readable log message to be written. This message is distinct from the end-user error in the main `message` property. Example of HTTP Response: From a51e30448df236e0709145cab441c00b1bf95c78 Mon Sep 17 00:00:00 2001 From: Stas Date: Tue, 2 Dec 2025 15:04:51 +0300 Subject: [PATCH 3/3] added example of the log object into Buddy HTTP response --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 99c0b338..ac8a462a 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,12 @@ Example of HTTP Response: }, "error_code": 0, "version": 3, - "content_type": "text/html" + "content_type": "text/html", + "log": { + "type": "auth", + "severity": "ERROR", + "message": "user already exists" + } } ```