# watchlog
Do you ever have a terminal watching logs or recompiling on save and you aren't sure if the most recent messages are from the change you just made, or 10 minutes ago? watchlog will help you but adding a message at the bottom of your terminal that haven't produced output recently. After a short period of no output watchlog will start displaying the time since last output below the command.
<pre>HTTP/1.1 GET /api/books/1 500
HTTP/1.1 GET /api/books/2 500
HTTP/1.1 GET /api/books/1 500
HTTP/1.1 GET /api/books/1 200
<font color="#8D9197">Last output 48s ago.</font>
</pre>
When the command produces more output it will look like normal if it hasn't been too long, however if it has been a while watchlog will inject a timestamp so that the logs are grouped by when they occurred when you scroll up.
<pre>HTTP/1.1 GET /api/books/1 500
HTTP/1.1 GET /api/books/2 500
HTTP/1.1 GET /api/books/1 500
HTTP/1.1 GET /api/books/1 200
<font color="#8D9197">2021-03-24 19:39:10</font>
HTTP/1.1 PUT /api/books/1 200
HTTP/1.1 GET /api/books/1 200
HTTP/1.1 GET /api/books/1 304
</pre>
## Usage
Simply put `| wl` after your command.
```sh
## Installation
### [Cargo](https://doc.rust-lang.org/cargo/)
```sh
$ cargo install watchlog
```
### [Nix](https://nixos.org)
```sh
$ nix-env -i -f . -A watchlog
```
## Questions, Comments or Feedback
watchlog is currently very basic. (For example it hardcodes [xterm ANSII escapes](https://gitlab.com/kevincox/watchlog/-/issues/1) and [values that I find convenient](https://gitlab.com/kevincox/watchlog/-/issues/2).) However I am happy to answer any questions, discuss features, bugs or possible contributions. Just [open an issue](https://gitlab.com/kevincox/watchlog/-/issues/new) (even if you just want to say hello)