Skip to content

Logging access log with native dont work. #9047

@rousseau-christopher

Description

@rousseau-christopher

Describe the bug
We can activate access log by setting property quarkus.http.access-log.enabled to true
When access-log is enabled. it work fine with jvm, but failed in native

Expected behavior (jvm output)

2020-05-04 14:19:57,434 INFO  [io.quarkus] (Quarkus Main Thread) code-with-quarkus 1.0.0-SNAPSHOT (powered by Quarkus 1.4.1.Final) started in 1.361s. Listening on: http://0.0.0.0:8080
2020-05-04 14:19:57,436 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2020-05-04 14:19:57,436 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, kotlin, resteasy, resteasy-jackson, smallrye-health, smallrye-metrics, smallrye-openapi, swagger-ui]
2020-05-04 14:20:09,791 INFO  [io.qua.htt.access-log] (vert.x-worker-thread-1) 127.0.0.1 - - [04/May/2020:14:20:09 +0200] "GET /health HTTP_1_1" 200 46

Actual behavior (native output)

2020-05-04 14:26:26,236 ERROR [io.qua.ver.htt.run.att.ExchangeAttributeParser] (main) Unknown token %h
2020-05-04 14:26:26,236 ERROR [io.qua.ver.htt.run.att.ExchangeAttributeParser] (main) Unknown token %l
2020-05-04 14:26:26,236 ERROR [io.qua.ver.htt.run.att.ExchangeAttributeParser] (main) Unknown token %u
2020-05-04 14:26:26,236 ERROR [io.qua.ver.htt.run.att.ExchangeAttributeParser] (main) Unknown token %t
2020-05-04 14:26:26,236 ERROR [io.qua.ver.htt.run.att.ExchangeAttributeParser] (main) Unknown token %r
2020-05-04 14:26:26,236 ERROR [io.qua.ver.htt.run.att.ExchangeAttributeParser] (main) Unknown token %s
2020-05-04 14:26:26,236 ERROR [io.qua.ver.htt.run.att.ExchangeAttributeParser] (main) Unknown token %b
2020-05-04 14:26:26,238 INFO  [io.quarkus] (main) code-with-quarkus 1.0.0-SNAPSHOT (powered by Quarkus 1.4.1.Final) started in 0.016s. Listening on: http://0.0.0.0:8080
2020-05-04 14:26:26,238 INFO  [io.quarkus] (main) Profile prod activated. 
2020-05-04 14:26:26,238 INFO  [io.quarkus] (main) Installed features: [cdi, kotlin, resteasy, resteasy-jackson, smallrye-health, smallrye-metrics, smallrye-openapi]
2020-05-04 14:26:33,294 INFO  [io.qua.htt.access-log] (executor-thread-1) %h %l %u %t "%r" %s %b

To Reproduce
Steps to reproduce the behavior:

  1. create a web project
  2. activate the access log : quarkus.http.access-log.enabled=true
  3. compile in native : mvn package -Pnative
  4. run the project: target/code-with-quarkus-1.0.0-SNAPSHOT-runner
  5. call any endpoint, ex : http://127.0.0.1:8080/health
  6. check the log output

Configuration

quarkus.http.access-log.enabled=true

Example of project that failed
code-with-quarkus.zip

Environment:

  • Output of uname -a or ver: Darwin pc-79.home 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
  • Output of java -version:
    openjdk version "11.0.6" 2020-01-14
    OpenJDK Runtime Environment GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02)
    OpenJDK 64-Bit Server VM GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02, mixed mode, sharing)
  • Quarkus version or git rev: 1.4.1
  • mvn version 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