workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

Strip colours (etc.) from wrangler logs output

Open Cherry opened this issue 1 year ago • 5 comments

Describe the solution

The new wrangler logs are great for debug, but often include contents that make them really hard to parse. Example:

image

--- 2023-11-22T16:29:48.163Z log
 ⛅️ wrangler 0.0.0-08ae28c6
[38;2;255;136;0m---------------------------[39m
--- 2023-11-22T16:29:48.602Z warn
[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mkj/async-io-win32.c++:982: warning: Bind address resolved to multiple addresses.  Only the first address will be used.  If this is incorrect, specify the address numerically.  This may be fixed in the future.; addrs[0].toString() = 127.0.0.1:62926[0m

wrangler-2023-11-22_16-29-47_041.log

It would be ideal if these ansi colours and other things are removed from the logs output.

Cherry avatar Nov 22 '23 17:11 Cherry