如何解析文本消息错误到对象错误`or`或stderr.pipe with color
我正在编写一个框架,我有一个问题:
当我使用.pipe
时,从runprocess.stderr
of spawn
我可以过滤错误消息。 't找到其错误消息颜色,它只是白色,
我如何可以用颜色或解析显示错误消息
消息到错误>错误
object(此错误消息是JavaScript的错误消息)
< a href =“ https://i.sstatic.net/5nyse.png” rel =“ nofollow noreferrer”>
I'm writing a framework I have a problem:
When i use .pipe
to filter the error message from runProcess.stderr
of spawn
i can't find its error message color and it's just white
How can i display error message with color or parse
message into Error
object (this error message is Error message of javascript)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过准备ASCII颜色代码来更改终端中文本的颜色。例如,实例
\ u001b [31m
会将文本颜色更改为红色。You can change the color of text in the terminal by prepending an ascii color code. For instance
\u001b[31m
would change the text color to red.