https://github.com/threefoldtech/tailstream
logstream is a watch tool per file that when the file has more data it reads it and stream it to given endpoints
https://github.com/threefoldtech/tailstream
Last synced: about 1 month ago
JSON representation
logstream is a watch tool per file that when the file has more data it reads it and stream it to given endpoints
- Host: GitHub
- URL: https://github.com/threefoldtech/tailstream
- Owner: threefoldtech
- License: apache-2.0
- Created: 2022-04-21T11:58:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-12T09:50:00.000Z (over 1 year ago)
- Last Synced: 2024-04-30T08:06:32.239Z (about 1 year ago)
- Language: Rust
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## tailstream
`tailstream` is like `tail -f` but streams the output based on command line config. By default file is tailed and streamed to console (act like tail)
but you can configure the output to send the data differently### Output
Output is configured via the `--output` which accepts a url.Currently tailstream supports three output types:
- `console://` [default] this output prints the file content to console. It doesn't accept any extra arguments
- `redis://[][:@][:port]/`. All logs (chunks) are `PUBLISH`ED to the `channel`. `channel` can be any valid PUB/SUB redis channel name.
- `ws[s]://[:port]/[path]`. All logs (chunks) are sent to the websocket as `binary` messages. The server then can decide what to do with the messages.### Compression
By default chunks are compressed with `gzip` compression algorithm. Currently the only supported compressions algorithms are:- `none`: no compression, chunks are pushed as is
- `gzip`: [default] gzip compression.> When compression is used, the receiver of the log chunks need to un-compress them before writing them again into a log file.
## Usage
```
tailstream
A tail like tool but tail the file to a configurable output moduleUSAGE:
tailstream [OPTIONS]ARGS:
file to watchOPTIONS:
-c, --compression compression, compresses the log message (per chunk) so each
chunk of logs can be decompressed separately from previous
chunks ignored in case of `console` output [default: gzip]
-d, --debug enable debug logs
-h, --help Print help information
-o, --output Output stream. defaults to console://. Other output supports
redis://[user:password@]
ws[s]://address[:port]/[prefix] [default: console://]
-t, --tail output the last TAIL bytes default to 8k [default: 8192]
-V, --version Print version information
```