通过 putty 使用 watch 、 tail 和 ccze 命令时生成损坏的日志
Corrupted log is generated when using watch , tail and ccze command through putty
我使用 putty 连接到装有 armbian debian jessie 软件的 cubietruck 板。我想查看应用程序的彩色实时日志。我按照以下示例 .
当我使用命令时:
tail -f app.log | ccze
效果很好。此外,当我使用命令时:
watch `tail -f app.log`
它也很管用。然而,当我给出时:
watch --color 'tail -f app.log | ccze'
或
watch -c 'tail -f app.log | ccze'
我得到了很多
(B
charachter 并且在大多数情况下在文本中没有新行被识别并且看起来像无缝文本。我假设颜色相关的 ASCII 字符没有正确解码。
我也将 putty 键盘从 ESC 更改为 VT400 和 Linux 但同样的问题发生了。
有谁知道我做错了什么吗?
watch -c -n5 'tail app.log | ccze -A'
- 省略
tail
的 -f
参数以停止跟踪日志文件中的更改(因为 watch
应该这样做)
- 将
-A
参数添加到 ccze
以启用原始 ANSI 颜色
我使用 putty 连接到装有 armbian debian jessie 软件的 cubietruck 板。我想查看应用程序的彩色实时日志。我按照以下示例
当我使用命令时:
tail -f app.log | ccze
效果很好。此外,当我使用命令时:
watch `tail -f app.log`
它也很管用。然而,当我给出时:
watch --color 'tail -f app.log | ccze'
或
watch -c 'tail -f app.log | ccze'
我得到了很多
(B
charachter 并且在大多数情况下在文本中没有新行被识别并且看起来像无缝文本。我假设颜色相关的 ASCII 字符没有正确解码。
我也将 putty 键盘从 ESC 更改为 VT400 和 Linux 但同样的问题发生了。
有谁知道我做错了什么吗?
watch -c -n5 'tail app.log | ccze -A'
- 省略
tail
的-f
参数以停止跟踪日志文件中的更改(因为watch
应该这样做) - 将
-A
参数添加到ccze
以启用原始 ANSI 颜色