@@ -1151,6 +1151,8 @@ to using the `JsonTemplateLayout`:
11511151</RollingRandomAccessFile>
11521152----
11531153
1154+ ==== JSON format log entries
1155+
11541156The `QueryLogJsonLayout.json` template mimics the 4.x layout and contains the following information:
11551157
11561158.JSON format log entries
@@ -1175,7 +1177,7 @@ The `QueryLogJsonLayout.json` template mimics the 4.x layout and contains the fo
11751177
11761178If the type of the log entry is `query`, these additional fields are available:
11771179
1178- .JSON format log entries
1180+ .JSON format log entries for log type `query`
11791181[cols="1m,3a", options="header"]
11801182|===
11811183| Name
@@ -1239,6 +1241,10 @@ Included when xref:configuration/configuration-settings.adoc#config_db.logs.quer
12391241| Reason for failure.
12401242Included when applicable.
12411243
1244+ | errorInfo
1245+ | label:new[Introduced in 5.25] GQL error information as a JSON object.
1246+ See <<gql-error-information, GQL error information>> for details on the contents of the `errorInfo` JSON object.
1247+
12421248| transactionId
12431249| The transaction ID of the running query.
12441250
@@ -1250,7 +1256,7 @@ Included when xref:configuration/configuration-settings.adoc#config_db.logs.quer
12501256
12511257If the type of the log entry is `transaction`, the following additional fields are available:
12521258
1253- .JSON format log entries
1259+ .JSON format log entries for log type `transaction`
12541260[cols="1m,3a", options="header"]
12551261|===
12561262| Name
@@ -1272,3 +1278,53 @@ Either same as `authenticatedUser` or an impersonated user.
12721278| transactionId
12731279| ID of the transaction.
12741280|===
1281+
1282+ [role=label--new-5.25]
1283+ [[gql-error-information]]
1284+ ==== GQL error information
1285+
1286+ The query log includes the GQL error information under the JSON object `errorInfo`.
1287+ `errorInfo` can contain the following elements:
1288+
1289+ * `GQLSTATUS` -- A 5-character long alpha-numeric code identifying the error.
1290+ * `statusDescription` -- A message describing the error.
1291+ * `classification` -- The type of error representing a division of client, transient, and database errors.
1292+ * `position` -- The position (a JSON object containing a field for `column`, `offset`, and `line`) in the query where this error occurred.
1293+ * `cause` -- A JSON object containing the `errorInfo` JSON object of the cause of the current `errorInfo` JSON object.
1294+
1295+ The following are examples of the `errorInfo` JSON object:
1296+
1297+ .`errorInfo` JSON object of a database error
1298+ [source%linenums,xml,options="nowrap",highlight=4]
1299+ ----
1300+ ...
1301+ "errorInfo": {
1302+ "GQLSTATUS": "51N66",
1303+ "statusDescription": "error: system configuration or operation exception - resource exhaustion. Insufficient resources to complete the request.",
1304+ "cause": {
1305+ "GQLSTATUS": "51N55",
1306+ "statusDescription": "error: system configuration or operation exception - cannot create additional database. Failed to create the database `db10`. The limit of databases is reached. Either increase the limit using the config setting dbms.max_databases or drop a database.",
1307+ "classification": "DATABASE_ERROR"
1308+ },
1309+ "classification": "DATABASE_ERROR"
1310+ },
1311+ ...
1312+ ----
1313+
1314+ .`errorInfo` JSON object of a client error
1315+ [source%linenums,xml,options="nowrap",highlight=4]
1316+ ----
1317+ ...
1318+ "errorInfo": {
1319+ "GQLSTATUS": "42N62",
1320+ "statusDescription": "error: syntax error or access rule violation - variable not defined. Variable `m` not defined.",
1321+ "position": {
1322+ "column": 18,
1323+ "offset": 17,
1324+ "line": 1
1325+ },
1326+ "classification": "CLIENT_ERROR"
1327+ },
1328+ "query": "MATCH (n) RETURN m",
1329+ ...
1330+ ----
0 commit comments