diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index ea132eb..710d9a9 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -3,7 +3,7 @@ name: Create and publish Docker image on: push: branches: - - 'main' + - 'issue-213-log-config' jobs: build-and-push-image: diff --git a/httpd-container.conf b/httpd-container.conf index d9e1ca1..f09c3b8 100644 --- a/httpd-container.conf +++ b/httpd-container.conf @@ -58,8 +58,10 @@ DocumentRoot "/static-html/htdocs" ErrorLog /dev/stdout -CustomLog /dev/stdout combined +ErrorLogFormat "{ \"@timestamp\":\"%{cu}tZ\", \"log.level\": \"WARN\", \"function\" : \"[%-m:%l]\" , \"process\" : \"[pid %P:tid %T]\" , \"message\" : \"%M\"}" LogLevel warn +LogFormat "{ \"@timestamp\":\"%{%Y-%m-%dT%T}t.%{usec_frac}t%{%z}t\", \"remoteIP\":\"%a\", \"host\":\"%V\", \"requestPath\":\"%U\", \"query\":\"%q\", \"method\":\"%m\", \"status\":\"%>s\", \"userAgent\":\"%{User-agent}i\", \"referer\":\"%{Referer}i\" }" json +TransferLog /dev/stdout TypesConfig /etc/apache2/mime.types