Skip to content

Instantly share code, notes, and snippets.

@xstefank
Created August 10, 2022 07:04
Show Gist options
  • Save xstefank/036ad52c5e40644ad1228915f22f5369 to your computer and use it in GitHub Desktop.
Save xstefank/036ad52c5e40644ad1228915f22f5369 to your computer and use it in GitHub Desktop.

script

#!/bin/sh

set -euox pipefail

http :8080/hello
http :8080/hellos
http :8080/app/hello
http :8080/app/hellos

http :8080/q/health
http :8080/q/healths
http :8080/app/q/health
http :8080/app/q/healths
http :8080/non-app/health
http :8080/non-app/healths

-- no properties set (default)

2022-08-10 08:17:34,210 INFO  [io.qua.htt.access-log] (executor-thread-0) 127.0.0.1 - - 10/Aug/2022:08:17:34 +0200 "GET /hello HTTP/1.1" 200 28
2022-08-10 08:17:34,496 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:17:34 +0200 "GET /hellos HTTP/1.1" 404 -
2022-08-10 08:17:34,773 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-0) 127.0.0.1 - - 10/Aug/2022:08:17:34 +0200 "GET /app/hello HTTP/1.1" 404 -
2022-08-10 08:17:35,049 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:17:35 +0200 "GET /app/hellos HTTP/1.1" 404 -
2022-08-10 08:17:35,337 INFO  [io.qua.htt.access-log] (vert.x-worker-thread-0) 127.0.0.1 - - 10/Aug/2022:08:17:35 +0200 "GET /q/health HTTP/1.1" 200 46
2022-08-10 08:17:35,612 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:17:35 +0200 "GET /q/healths HTTP/1.1" 404 -
2022-08-10 08:17:35,888 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-0) 127.0.0.1 - - 10/Aug/2022:08:17:35 +0200 "GET /app/q/health HTTP/1.1" 404 -
2022-08-10 08:17:36,162 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:17:36 +0200 "GET /app/q/healths HTTP/1.1" 404 -
2022-08-10 08:17:36,440 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-0) 127.0.0.1 - - 10/Aug/2022:08:17:36 +0200 "GET /non-app/health HTTP/1.1" 404 -
2022-08-10 08:17:36,725 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:17:36 +0200 "GET /non-app/healths HTTP/1.1" 404 -

Everything is logged as root-path is /


quarkus.http.root-path=/app
2022-08-10 08:18:53,096 INFO  [io.qua.htt.access-log] (executor-thread-0) 127.0.0.1 - - 10/Aug/2022:08:18:53 +0200 "GET /app/hello HTTP/1.1" 200 28
2022-08-10 08:18:53,382 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:18:53 +0200 "GET /app/hellos HTTP/1.1" 404 -
2022-08-10 08:18:54,227 INFO  [io.qua.htt.access-log] (vert.x-worker-thread-0) 127.0.0.1 - - 10/Aug/2022:08:18:54 +0200 "GET /app/q/health HTTP/1.1" 200 46
2022-08-10 08:18:54,509 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:18:54 +0200 "GET /app/q/healths HTTP/1.1" 404 -

Only paths under root-path (/app) are logged (same as current behaviour)


quarkus.http.non-application-root-path=/non-app
2022-08-10 08:20:00,111 INFO  [io.qua.htt.access-log] (executor-thread-0) 127.0.0.1 - - 10/Aug/2022:08:20:00 +0200 "GET /hello HTTP/1.1" 200 28
2022-08-10 08:20:00,412 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:20:00 +0200 "GET /hellos HTTP/1.1" 404 -
2022-08-10 08:20:00,688 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-0) 127.0.0.1 - - 10/Aug/2022:08:20:00 +0200 "GET /app/hello HTTP/1.1" 404 -
2022-08-10 08:20:00,966 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:20:00 +0200 "GET /app/hellos HTTP/1.1" 404 -
2022-08-10 08:20:01,239 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-0) 127.0.0.1 - - 10/Aug/2022:08:20:01 +0200 "GET /q/health HTTP/1.1" 404 -
2022-08-10 08:20:01,516 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:20:01 +0200 "GET /q/healths HTTP/1.1" 404 -
2022-08-10 08:20:01,800 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-0) 127.0.0.1 - - 10/Aug/2022:08:20:01 +0200 "GET /app/q/health HTTP/1.1" 404 -
2022-08-10 08:20:02,076 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:20:02 +0200 "GET /app/q/healths HTTP/1.1" 404 -
2022-08-10 08:20:02,376 INFO  [io.qua.htt.access-log] (vert.x-worker-thread-0) 127.0.0.1 - - 10/Aug/2022:08:20:02 +0200 "GET /non-app/health HTTP/1.1" 200 46
2022-08-10 08:20:02,654 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:20:02 +0200 "GET /non-app/healths HTTP/1.1" 404 -

Everything is still under root-path router / including non-app (everything logged only once)


quarkus.http.root-path=/app
quarkus.http.non-application-root-path=/non-app
2022-08-10 08:43:01,500 INFO  [io.qua.htt.access-log] (executor-thread-0) 127.0.0.1 - - 10/Aug/2022:08:43:01 +0200 "GET /app/hello HTTP/1.1" 200 28
2022-08-10 08:43:01,791 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:43:01 +0200 "GET /app/hellos HTTP/1.1" 404 -
2022-08-10 08:43:02,636 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-0) 127.0.0.1 - - 10/Aug/2022:08:43:02 +0200 "GET /app/q/health HTTP/1.1" 404 -
2022-08-10 08:43:02,919 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:43:02 +0200 "GET /app/q/healths HTTP/1.1" 404 -
2022-08-10 08:43:03,210 INFO  [io.qua.htt.access-log] (vert.x-worker-thread-0) 127.0.0.1 - - 10/Aug/2022:08:43:03 +0200 "GET /non-app/health HTTP/1.1" 200 46
2022-08-10 08:43:03,488 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-1) 127.0.0.1 - - 10/Aug/2022:08:43:03 +0200 "GET /non-app/healths HTTP/1.1" 404 53

Only paths under root-path (/app) and non-root-path (/non-app) are logged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment