Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide the possibility to log user data from exchange #26339

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

pilhuhn
Copy link
Contributor

@pilhuhn pilhuhn commented Jun 24, 2022

It is now possible to use %{d,data-key} in access log expressions to log an attribute from the Vert.X RoutingContext.data map

E.g.

quarkus.http.access-log.pattern="%h %l %u %t \"%r\" %s %b accountId=%{d,x-rh-account}"

would result in

2022-06-24 09:05:48,960 INFO [access_log] (executor-thread-2) "127.0.0.1 - joe-doe-user 24/Jun/2022:09:05:48 +0200 "GET / HTTP/1.1" 403 - accountId= 1234"

Fixes #26338

@quarkus-bot
Copy link

quarkus-bot bot commented Jun 24, 2022

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should not end up with dot

This message is automatically generated by a bot.

@pilhuhn pilhuhn changed the title Provide the possibility to log user data from exchange. Provide the possibility to log user data from exchange Jun 24, 2022
@pilhuhn
Copy link
Contributor Author

pilhuhn commented Jun 24, 2022

cc @stuartwdouglas

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks interesting, I will merge it, thanks!

@gsmet gsmet merged commit b8eb028 into quarkusio:main Jun 30, 2022
@quarkus-bot quarkus-bot bot added this to the 2.11 - main milestone Jun 30, 2022
@pilhuhn pilhuhn deleted the access_log_exchange_data branch June 30, 2022 14:12
@gsmet gsmet added the kind/enhancement New feature or request label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertx kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow access log to also access the exchange data
2 participants