Skip to content

feature request: custom MockServerLogger #1960

@basinilya

Description

@basinilya

Describe the feature request
When instantiating org.mockserver.integration.ClientAndServer I want to provide a customized MockServerLogger.

What you are trying to do
By default HTTP requests and responses are logged with INFO level and their binary bodies are encoded as single line base64 JSON value inside a request/response JSON. When a long line is printed it makes my IDE freeze.

The solution you'd like
I want to override logEvent(LogEntry) and substitute logEntry with a customized copy where getMessage is overridden. In it I want to abbreviate long bodies.

Describe alternatives you've considered
It's possible to customize appenders in Logback or Log4j2, but this solution is fragile.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions