Skip to content

ContentPreviewingService logs are inserted after custom logs #6132

Open
@sedax90

Description

@sedax90

I've added some decorators to my ServerBuilder:

        sb.decorator(LoggingService.newDecorator());

        // Add request/response preview data to logs
        sb.decorator(ContentPreviewingService.newDecorator(Integer.MAX_VALUE));

        // Add trace ID to every request/response
        sb.decorator(TraceIdDecorator::new);

        return sb.build();

With these decorators I would expect log output like this:

REQUEST LOG
MY CUSTOM LOGS...
RESPONSE LOG

but the output that i optain is:

MY CUSTOM LOGS...
REQUEST LOG
RESPONSE LOG

and request/response do not contain the traceId value that I added as a custom decorator (while all the others do).

How can I get the logs to be written in the correct order?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions