feat: allow tailing a specific number of log lines

This commit is contained in:
Jose Diaz-Gonzalez
2021-10-26 22:27:15 -04:00
parent 29f1f3dd3d
commit 88e6d790e1
4 changed files with 20 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ redis:link <service> <app> [--link-flags...] # link the redis service to t
redis:linked <service> <app> # check if the redis service is linked to an app
redis:links <service> # list all apps linked to the redis service
redis:list # list all redis services
redis:logs <service> [-t|--tail] # print the most recent log(s) for this service
redis:logs <service> [-t|--tail] <tail-num-optional> # print the most recent log(s) for this service
redis:promote <service> <app> # promote service <service> as REDIS_URL in <app>
redis:restart <service> # graceful shutdown and restart of the redis service container
redis:start <service> # start a previously stopped redis service
@@ -153,12 +153,12 @@ dokku redis:list
```shell
# usage
dokku redis:logs <service> [-t|--tail]
dokku redis:logs <service> [-t|--tail] <tail-num-optional>
```
flags:
- `-t|--tail`: do not stop when end of the logs are reached and wait for additional output
- `-t|--tail [<tail-num>]`: do not stop when end of the logs are reached and wait for additional output
You can tail logs for a particular service:
@@ -172,6 +172,12 @@ By default, logs will not be tailed, but you can do this with the --tail flag:
dokku redis:logs lollipop --tail
```
The default tail setting is to show all logs, but an initial count can also be specified:
```shell
dokku redis:logs lollipop --tail 5
```
### link the redis service to the app
```shell