From 25733a83f99a1df4cdf4377c7b58a7ec1d65b8ea Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Mon, 23 May 2022 18:22:15 +0300 Subject: [PATCH] Added tool version to nginx logs. --- docker/files/nginx.conf | 2 +- src/Libs/Initializer.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/files/nginx.conf b/docker/files/nginx.conf index da82d537..c6fe1d76 100644 --- a/docker/files/nginx.conf +++ b/docker/files/nginx.conf @@ -25,7 +25,7 @@ http { log_format traceable '[$time_iso8601] status: $status - origin: "$upstream_http_x_wh_backend" - text: "$upstream_http_x_status" - apikey: "$http_x_apikey" ' '- event: "$upstream_http_x_wh_event" - type: "$upstream_http_x_wh_type" - id: "$request_id" ' - '- item: "$upstream_http_x_wh_item" - record_id: "$upstream_http_x_wh_id" ' + '- item: "$upstream_http_x_wh_item" - record_id: "$upstream_http_x_wh_id" - version: "$upstream_http_x_wh_version" ' '- request: "$request":$body_bytes_sent - ip: $remote_addr - host: $http_host - agent: "$http_user_agent"'; server { diff --git a/src/Libs/Initializer.php b/src/Libs/Initializer.php index b435161b..22776e1e 100644 --- a/src/Libs/Initializer.php +++ b/src/Libs/Initializer.php @@ -287,6 +287,7 @@ final class Initializer 'X-WH-Id' => '?', 'X-WH-Type' => $request->getAttribute('WH_TYPE', 'not_set'), 'X-WH-Event' => $request->getAttribute('WH_EVENT', 'not_set'), + 'X-WH-Version' => getAppVersion(), ]; if (!$entity->hasGuids() && !$entity->hasRelativeGuid()) {