Skip to content

Commit

Permalink
trim workerd stdout/stderr chunks before logging
Browse files Browse the repository at this point in the history
doesn't actually change anything but 🤷‍♂️
  • Loading branch information
RamIdeas committed Nov 10, 2023
1 parent fd9ee9a commit be11679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/wrangler/src/dev/miniflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ function handleRuntimeStdio(stdout: Readable, stderr: Readable) {
};

stdout.on("data", (chunk: Buffer | string) => {
chunk = chunk.toString();
chunk = chunk.toString().trim();

if (classifiers.isBarf(chunk)) {
// this is a big chonky barf from workerd that we want to hijack to cleanup/ignore
Expand All @@ -434,7 +434,7 @@ function handleRuntimeStdio(stdout: Readable, stderr: Readable) {
});

stderr.on("data", (chunk: Buffer | string) => {
chunk = chunk.toString();
chunk = chunk.toString().trim();

if (classifiers.isBarf(chunk)) {
// this is a big chonky barf from workerd that we want to hijack to cleanup/ignore
Expand Down

0 comments on commit be11679

Please sign in to comment.