Etherpad-lite: Etherpad不应将终端序列打印到文件日志中

创建于 2015-05-31  ·  8评论  ·  资料来源: ether/etherpad-lite

仅当输出是实际端子时才需要打印端子序列。

Minor Bug

所有8条评论

请详细说明

2015年5月31日05:36,yurivict [email protected]写道:

仅当输出是实际端子时才需要打印端子序列。

-
直接回复此电子邮件,或在Gi tHub https://github.com/ether/etherpad-lite/issues/2685上查看

通过管道传输到文件时,日志如下所示

Started Etherpad...
^[[33m[2015-05-30 21:26:58.721] [WARN] console - ^[[39mDirtyDB is used. This is fine for testing but not recommended for production.
^[[32m[2015-05-30 21:27:00.402] [INFO] console - ^[[39mInstalled plugins:
^[[32m[2015-05-30 21:27:00.439] [INFO] console - ^[[39mReport bugs at https://github.com/ether/etherpad-lite/issues
^[[32m[2015-05-30 21:27:00.442] [INFO] console - ^[[39mYour Etherpad version is 1.5.6 (b049f4b)
^[[32m[2015-05-30 21:27:00.622] [INFO] console - ^[[39mYou can access your Etherpad instance at http://0.0.0.0:9001/
^[[33m[2015-05-30 21:27:00.622] [WARN] console - ^[[39mAdmin username and password not set in settings.json.  To access admin please uncomment and edit 'users' in settings.json

听起来像是log4js错误? 我们用那个...

2015年5月31日10:46,yurivict [email protected]写道:

通过管道传输到文件时,日志如下所示

开始Etherpad ...
^ [[33m [2015-05-30 21:26:58.721] [WARN]控制台-使用^ [[39mDirtyDB。 这对于测试很好,但不建议用于生产。
^ [[32m [2015-05-30 21:27:00.402] [INFO]控制台-^ [[39mInstalled plugins:
^ [[32m [2015-05-30 21:27:00.439]] [INFO]控制台-^ [[39mReport bug at https://github.com/ether/etherpad-lite/issues
^ [[32m [2015-05-30 21:27:00.442]] [INFO]控制台-^ [[39m您的Etherpad版本是1.5.6(b049f4b)
^ [[32m [2015-05-30 21:27:00.622] [INFO]控制台-^ [[39m您可以通过http://0.0.0.0:9001 /访问您的Etherpad实例
^ [[33m [2015-05-30 21:27:00.622]] [WARN]控制台-^ [[39mAdmin用户名和密码未在settings.json中设置。 要访问管理员,请取消注释并在settings.json中编辑“用户”

-
直接回复此电子邮件或在Gi tHub上查看它

git〜6个月前,与传呼器有关,也出现了同样的问题。 您可能想在档案中查找该讨论。 我记得很难猜测寻呼机是否可以处理颜色。 他们最终坚持使用颜色,但是猜测工作使系统容易出错。 没有一般的方法可以准确地做到这一点。

您要么必须走这种艰难的道路。 或者仅在输出不是终端时禁用颜色,这很容易100%完成。

如果您有简单的解决方法,我会接受请求请求

现在,当我查看时,您将获得很多带有终端序列的复制粘贴代码。
您需要使用一些标准的js程序包(例如https://github.com/sindresorhus/chalk),然后该程序包将正确处理打印,或者很容易修复。 但是当前的硬编码样式却不行。

@yurivict参见#2835

一种解决方案可能是反过来看:仅在需要时才进行彩色渲染。

此页面是否有帮助?
0 / 5 - 0 等级