mirror of
https://github.com/KevinMidboe/schleppe-lab.git
synced 2025-10-29 17:50:39 +00:00
Replaced main logger with JSON formatting
This commit is contained in:
@@ -47,6 +47,7 @@ trigger:
|
||||
- pull_request
|
||||
branch:
|
||||
- main
|
||||
- feat/nginx-json-logs
|
||||
|
||||
depends_on:
|
||||
- Build
|
||||
@@ -107,6 +108,7 @@ trigger:
|
||||
- pull_request
|
||||
branch:
|
||||
- main
|
||||
- feat/nginx-json-logs
|
||||
|
||||
depends_on:
|
||||
- Build
|
||||
@@ -118,6 +120,6 @@ volumes:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 09d1d630e540afad36b45ad1df42ab8bb9675218fc567872f2916ca0614c7ee7
|
||||
hmac: aea9d888a8d4261c7f1d654fe5d9e1fe5aee95e565bb689251eae23d8c4a41a2
|
||||
|
||||
...
|
||||
|
||||
15
nginx.conf
15
nginx.conf
@@ -14,9 +14,18 @@ http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
log_format main escape=json
|
||||
'{'
|
||||
'"time_local":"$time_local",'
|
||||
'"remote_addr":"$remote_addr",'
|
||||
'"remote_user":"$remote_user",'
|
||||
'"request":"$request",'
|
||||
'"status": "$status",'
|
||||
'"body_bytes_sent":"$body_bytes_sent",'
|
||||
'"request_time":"$request_time",'
|
||||
'"http_referrer":"$http_referer",'
|
||||
'"http_user_agent":"$http_user_agent"'
|
||||
'}';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user