Added tool version to nginx logs.

This commit is contained in:
Abdulmhsen B. A. A
2022-05-23 18:22:15 +03:00
parent f91ab6d6b8
commit 25733a83f9
2 changed files with 2 additions and 1 deletions

View File

@@ -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 {

View File

@@ -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()) {