wiremock / wiremock/WireMock.Net

Incorrectly encoded logger output

Open
#1,062 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
1.7k
Forks
240
Avg merge
5d 12h
Merged PRs (30d)
2

Description

Describe the bug

The Wiremock console logger does not encode newline characters in the output. This causes problems with the log shipping mechanisms.

Expected behaviour:

I am using the WireMock.Net docker image to test my services within the K8s cluster. Because the output is formatted incorrectly, the log shipping mechanism treats each line as a separate log entry, resulting in a huge amount of log entries that are completely corrupted.

Below is the output from the Rancher console. As you can see, each line of formatted json is treated as a separate log entry:
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the WireMock console logger and reproduce the issue with multiline formatted JSON in the Docker environment described. Done means newline characters are encoded in console output so log shipping keeps the formatted JSON as one log entry instead of splitting it across lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.