logtail is a logfile monitoring tool I made while Learning Rust and which I’m developing for vault monitoring as vdash. Until vdash is useful though, you can monitor local vaults using logtail.
The above instructions didn’t work for me on Windows. Seems to be the same error as previously. I’ll try from the Git repo a bit later.
Summary
$ cargo install logtail --bin logtail-crossterm --features="crossterm"
Updating crates.io index
Downloaded logtail v0.2.2
Downloaded 1 crate (27.4 KB) in 6.80s
Installing logtail v0.2.2
Downloaded autocfg v1.0.1
Downloaded once_cell v1.4.1
Downloaded libc v0.2.76
Downloaded 3 crates (543.8 KB) in 7.62s
Compiling proc-macro2 v1.0.19
Compiling winapi v0.3.9
Compiling unicode-xid v0.2.1
Compiling syn v1.0.38
Compiling cfg-if v0.1.10
Compiling version_check v0.9.2
Compiling bitflags v1.2.1
Compiling lazy_static v1.4.0
Compiling pin-project-internal v0.4.23
Compiling memchr v2.3.3
Compiling proc-macro-nested v0.1.6
Compiling futures-core v0.3.5
Compiling libc v0.2.76
Compiling autocfg v1.0.1
Compiling getrandom v0.1.14
Compiling once_cell v1.4.1
Compiling futures-sink v0.3.5
Compiling proc-macro-hack v0.5.18
Compiling slab v0.4.2
Compiling smallvec v1.4.2
Compiling unicode-segmentation v1.6.0
Compiling scopeguard v1.1.0
Compiling pin-utils v0.1.0
Compiling unicode-width v0.1.8
Compiling futures-io v0.3.5
Compiling strsim v0.8.0
Compiling pin-project-lite v0.1.7
Compiling fnv v1.0.7
Compiling bytes v0.5.6
Compiling vec_map v0.8.2
Compiling anymap v0.12.1
Compiling ppv-lite86 v0.2.9
Compiling numtoa v0.1.0
Compiling cassowary v0.3.0
Compiling futures-channel v0.3.5
Compiling futures-task v0.3.5
Compiling lock_api v0.3.4
Compiling textwrap v0.11.0
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling heck v0.3.1
Compiling crossbeam-utils v0.7.2
Compiling rand_core v0.5.1
Compiling termion v1.5.5
Compiling quote v1.0.7
error[E0433]: failed to resolve: maybe a missing crate `sys`?
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\lib.rs:24:9
|
24 | pub use sys::size::terminal_size;
| ^^^ maybe a missing crate `sys`?
error[E0433]: failed to resolve: maybe a missing crate `sys`?
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\lib.rs:27:9
|
27 | pub use sys::tty::{is_tty, get_tty};
| ^^^ maybe a missing crate `sys`?
error[E0433]: failed to resolve: maybe a missing crate `sys`?
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\async.rs:5:5
|
5 | use sys::tty::get_tty;
| ^^^ maybe a missing crate `sys`?
error[E0433]: failed to resolve: maybe a missing crate `sys`?
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:29:5
|
29 | use sys::attr::{get_terminal_attr, raw_terminal_attr, set_terminal_attr};
| ^^^ maybe a missing crate `sys`?
error[E0432]: unresolved import `sys`
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:28:5
|
28 | use sys::Termios;
| ^^^ maybe a missing crate `sys`?
error[E0425]: cannot find function `get_tty` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\async.rs:14:36
|
14 | thread::spawn(move || for i in get_tty().unwrap().bytes() {
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `get_tty` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\async.rs:43:36
|
43 | thread::spawn(move || for i in get_tty().unwrap().bytes() {
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `set_terminal_attr` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:45:9
|
45 | set_terminal_attr(&self.prev_ios).unwrap();
| ^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `get_terminal_attr` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:90:23
|
90 | let mut ios = get_terminal_attr()?;
| ^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `raw_terminal_attr` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:93:9
|
93 | raw_terminal_attr(&mut ios);
| ^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `set_terminal_attr` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:95:9
|
95 | set_terminal_attr(&ios)?;
| ^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `set_terminal_attr` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:107:9
|
107 | set_terminal_attr(&self.prev_ios)?;
| ^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `get_terminal_attr` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:113:23
|
113 | let mut ios = get_terminal_attr()?;
| ^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `raw_terminal_attr` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:114:9
|
114 | raw_terminal_attr(&mut ios);
| ^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `set_terminal_attr` in this scope
--> C:\Users\John\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:115:9
|
115 | set_terminal_attr(&ios)?;
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: aborting due to 15 previous errors
Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `termion`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `logtail v0.2.2`, intermediate artifacts can be found at `C:\Users\John\AppData\Local\Temp\cargo-installIwMIXk`
Caused by:
build failed
Thanks John, I may have forgotten something that I did to the windows10 branch. I’ll have a look too. Please try with ‘master’ and let me know what happens.
I’m working with the local run-baby-fleming --testing vaults, is there anyway to make them persistent after restarting my server? I give out safe-url addresses for the @SafeNetworkWallet_bot but when the server restarts I have to re-run safe vault run-baby-fleming --testing because the vaults processes are terminated and the state is basically reset. The users have to reinitialize again to get new keys which I don’t like and was hoping there is an option for persistent test vaults?
You seem to know a lot about Rust and the process so I thought maybe you can help me out with this question.
I know very little about Rust at present and even less about vaults unfortunately, so I don’t know if you can restart without init, but I doubt it at this point as I think it would need extra code that is not required yet.
Thanks, which distro are you on? Glad you like logtail, I’m very pleased with it as a first Rust app even though all I’ve done so far is glued linemux and tui-rs together and created a simple TUI using the latter. I’m now going to start parsing the lines and gather some metrics to make a vault dashboard (vdash).
For such a complex language I’m finding the Learning Rust experience relatively easy and a lot of fun. Great tooling, very helpful compiler messages, superb community with official and unofficial support channels on Discord and Discourse forum. If you or anyone is tempted come on in, the code is lovely!
Hi John, I have fix which is a bit ugly until they fix a bug in the cargo dependency selection, so it requires use of the nightly compiler. Please try ‘master’ branch as follows and let me know:
Thanks very much John. I’ll add that to the README. AFAIK logtail now works on Linux and Windows. It does build on MacOS, the author of linemux has been helping there but he reports that the updates don’t make it to the display so it’s nearly there for basic functionality. Meanwhile I’m about to start parsing vault logs to gather metrics (in vdash, the vault version of logtail).
Excellent - I had to install nightly btw - may be worth adding to the README if that’s going to be a requirement for a while rustup toolchain install nightly