|
2 | 2 | ------------
|
3 | 3 |
|
4 | 4 | A cli tool to watch log information
|
| 5 | + |
| 6 | +# Installation |
| 7 | + |
| 8 | +```shell |
| 9 | +$ go get github.com/wonsikin/beehive/cmd/beehive |
| 10 | +``` |
| 11 | + |
| 12 | +# Usage |
| 13 | + |
| 14 | +### Help |
| 15 | + |
| 16 | +```shell |
| 17 | +$ beehive --help |
| 18 | + |
| 19 | + NAME: |
| 20 | + beehive - eat log messages and display it |
| 21 | + |
| 22 | + USAGE: |
| 23 | + beehive [global options] command [command options] [arguments...] |
| 24 | + |
| 25 | + VERSION: |
| 26 | + v0.1.0 |
| 27 | + |
| 28 | + COMMANDS: |
| 29 | + init create a configuration file |
| 30 | + help, h Shows a list of commands or help for one command |
| 31 | + |
| 32 | + GLOBAL OPTIONS: |
| 33 | + --role value, -r value running as 'queen' or 'worker' (default: "queen") |
| 34 | + --port value, -p value listen port of beehive (default: 13000) |
| 35 | + --config FILE, -c FILE load configuration from FILE, default value is ./beehive-queen.conf.yaml when running as the queen role and is ./beehive-worker.conf.yaml when running as worker role |
| 36 | + --help, -h show help |
| 37 | + --version, -v print the version |
| 38 | +``` |
| 39 | + |
| 40 | +### Init configuration file |
| 41 | + |
| 42 | +``` |
| 43 | +$ beehive init |
| 44 | +
|
| 45 | + Use the arrow keys to navigate: ↓ ↑ → ← |
| 46 | + ? Generate configuration for which role?: |
| 47 | + ▸ queen |
| 48 | + worker |
| 49 | +``` |
| 50 | + |
| 51 | +### Running as the queen server |
| 52 | + |
| 53 | +``` |
| 54 | +$ beehive -r queen |
| 55 | +
|
| 56 | + 2018-04-02 18:53:13 info src/db/mongo/connect.go:22 connect to mongodb successfully |
| 57 | + 2018-04-02 18:53:13 info cmd/beehive/app.go:120 beehive is served at :13000 |
| 58 | +``` |
| 59 | + |
| 60 | +### Running as the worker |
| 61 | + |
| 62 | +``` |
| 63 | +$ beehive -r worker |
| 64 | +
|
| 65 | + Worker arturo-n1.local is running |
| 66 | + 2018/04/02 18:55:58 Seeked ./log.log - &{Offset:0 Whence:2} |
| 67 | +``` |
| 68 | + |
| 69 | + |
| 70 | +# TODO |
| 71 | + |
| 72 | +* [x] merge two cli into one |
| 73 | +* [ ] supported multi log sources |
| 74 | +* [ ] management platform |
| 75 | +* [ ] workers' health report |
| 76 | +* [ ] set log level and log path parameter |
0 commit comments