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

Allow access log to also access the exchange data #26338

Closed
pilhuhn opened this issue Jun 24, 2022 · 2 comments · Fixed by #26339
Closed

Allow access log to also access the exchange data #26338

pilhuhn opened this issue Jun 24, 2022 · 2 comments · Fixed by #26339
Labels
kind/enhancement New feature or request
Milestone

Comments

@pilhuhn
Copy link
Contributor

pilhuhn commented Jun 24, 2022

Description

The (Vert.x) routing context has a generic data store. Allow to log entries from that store in access log.

In our project we have a need to e.g. also log the tenantId of a logged in user in addition to the login-name.
We put that tenant id into the routing context

routingContext.put(X_RH_ACCOUNT, rhIdentity.identity.accountNumber);

Now it would be neat to easily log that value
E.g.

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"

Implementation ideas

Follow the example of other AccessLog attribute handlers in vertx-http

@pilhuhn
Copy link
Contributor Author

pilhuhn commented Jul 1, 2022

@gsmet Shall I just close this one?

@gsmet gsmet added this to the 2.11 - main milestone Jul 1, 2022
@gsmet gsmet closed this as completed Jul 1, 2022
@gsmet
Copy link
Member

gsmet commented Jul 1, 2022

I adjusted the description of the PR using Fixes so that the issue is linked to the PR properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants