Skip to content

Commit

Permalink
fix responseModifiers debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
vpalmisano committed Feb 28, 2024
1 parent 78cb9c6 commit 44c6f52
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,11 @@ export class Session extends EventEmitter {
)
})
} catch (err) {
log.error(`error parsing responseModifiers: ${(err as Error).stack}`)
log.error(
`error parsing responseModifiers "${responseModifiers}": ${
(err as Error).stack
}`,
)
}
}

Expand Down Expand Up @@ -1028,7 +1032,9 @@ window.SERVER_USE_HTTPS = ${this.serverUseHttps};
if (body) {
log.debug(
`using responseModifiers in: ${event.request.url}`,
replacements,
replacements.map(
({ search, replace }) => `${search.toString()} => ${replace}`,
),
)
replacements.forEach(({ search, replace }) => {
body = body?.replace(search, replace)
Expand Down

0 comments on commit 44c6f52

Please sign in to comment.