feat(komorebic): add log command

This commit adds a log command directly to the komorebic cli to make it
easier for users to check the logs if they don't have tail installed or
are not familiar with it.

A separate logfile with ANSI color codes is now being written to the
user's tempdir, which is tailed by the log command until the process is
halted by a Ctrl-C signal.
This commit is contained in:
LGUG2Z
2021-08-18 06:21:16 -07:00
parent 23aada05d0
commit 13b335cecc
4 changed files with 37 additions and 7 deletions
Generated
+14 -4
View File
@@ -274,6 +274,15 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "fs-tail"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73c8ee8694b2ad6d79aa976ad8572ca376c0450290041e6e3ae75147356b6ad2"
dependencies = [
"memchr",
]
[[package]]
name = "fsevent"
version = "0.4.0"
@@ -488,6 +497,7 @@ dependencies = [
"clap",
"color-eyre",
"dirs",
"fs-tail",
"komorebi-core",
"paste",
"powershell_script",
@@ -1151,9 +1161,9 @@ dependencies = [
[[package]]
name = "tracing-core"
version = "0.1.18"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052"
checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8"
dependencies = [
"lazy_static",
]
@@ -1191,9 +1201,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
version = "0.2.19"
version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab69019741fca4d98be3c62d2b75254528b5432233fd8a4d2739fec20278de48"
checksum = "b9cbe87a2fa7e35900ce5de20220a582a9483a7063811defce79d7cbd59d4cfe"
dependencies = [
"ansi_term",
"chrono",