Skip to content

http access log attributes do not work #9847

@jrongs

Description

@jrongs

certain http access log attributes do not work, namely %t, %D
always getting "-" for those attributes in the log.

for the following pattern:
%t "%r" %s %b %D "%{i,Referer}" "%{i,User-Agent}"

getting the following line in the log file:

  • "GET /_health HTTP_1_1" 200 2 - "-" "curl/7.58.0"

Expected behavior
%t - Date and time, in Common Log Format format
%D - Time taken to process the request, in millis

Actual behavior

always getting dashes ("-") for those attributes

To Reproduce
see the Configuration section.

Configuration

quarkus.http.access-log.enabled = true
quarkus.http.access-log.pattern = %t "%r" %s %b %D "%{i,Referer}" "%{i,User-Agent}"
quarkus.http.access-log.log-to-file = true
quarkus.http.access-log.base-file-name = http-access
quarkus.http.access-log.log-directory = /var/log/quarkus/http

Environment (please complete the following information):
x86_64 GNU/Linux
OpenJDK Runtime Environment Corretto-11.0.7.10.1 (build 11.0.7+10-LTS)
Quarkus 1.5.0
Apache Maven 3.6.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions