9个版本
使用旧Rust 2015
0.1.8 | 2018年2月21日 |
---|---|
0.1.7 | 2018年2月20日 |
#42 in #line-numbers
33KB
588 行
Chase

为关注行号的用户在Rust中实现异步和同步文件跟踪
目标
- 为每行输出的行号
- 能够通过编程方式退出监视循环
- 自动处理文件旋转
- 跨平台异步
- 可配置(从哪一行开始、延迟和重试等)
- 同步使用简单
- 异步使用简单
使用方法
您可以使用此工具作为库和二进制文件
作为库
一些功能(例如,作为Stream
接收,以及库提供的结构的Serde derive)已通过功能门控,因此请记住在添加依赖项时注意这一点(有关功能列表,请参阅Cargo.toml
)
作为二进制文件
cargo安装 chase --功能=binary
Chases a file through thick and thin.
USAGE:
chase [OPTIONS] <f>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-L, --line <l> The line you want to start chasing your file from [default: 0]
ARGS:
<f> The file you want to chase
注意事项
Windows尚未支持:需要找出哪些inode映射到
致谢
非常受logwatcher的启发
依赖项
~0–310KB