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

[FEATURE] serialize requests to JSON #588

Closed
dblock opened this issue Jul 31, 2023 · 1 comment
Closed

[FEATURE] serialize requests to JSON #588

dblock opened this issue Jul 31, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@dblock
Copy link
Member

dblock commented Jul 31, 2023

Is your feature request related to a problem?

Add a way to easily serialize queries to JSON for logging.

What solution would you like?

            IndexRequest<Movie> indexRequest = new IndexRequest.Builder<Movie>()
                    .index(index)
                    .id("1")
                    .document(movie)
                    .build();

            logger.info("JSON: {}", indexRequest.toJson());

Working serialization code here.

Do you have any additional context?

From a Slack discussion in https://opensearch.slack.com/archives/C051XNH62KB/p1690396113772759

@dblock dblock added enhancement New feature or request untriaged labels Jul 31, 2023
@wbeckler wbeckler removed the untriaged label Aug 2, 2023
@wbeckler
Copy link

wbeckler commented Aug 2, 2023

Sounds cool. I've seen a few people request this, and it's cleaner than using log4j.

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

No branches or pull requests

3 participants