mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vlogscli: print hint on how to see available commands when starting vlogscli
This should improve the first-time experience with vlogscli
This commit is contained in:
parent
3c06d083ea
commit
8faee6b446
1 changed files with 5 additions and 3 deletions
|
@ -69,8 +69,8 @@ func main() {
|
||||||
fatalf("cannot initialize readline: %s", err)
|
fatalf("cannot initialize readline: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Fprintf(rl, "sending queries to %s\n", *datasourceURL)
|
fmt.Fprintf(rl, "sending queries to -datasource.url=%s\n", *datasourceURL)
|
||||||
|
fmt.Fprintf(rl, `type ? and press enter to see available commands`+"\n")
|
||||||
runReadlineLoop(rl, &incompleteLine)
|
runReadlineLoop(rl, &incompleteLine)
|
||||||
|
|
||||||
if err := rl.Close(); err != nil {
|
if err := rl.Close(); err != nil {
|
||||||
|
@ -252,7 +252,7 @@ func isHelpCommand(s string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func printCommandsHelp(w io.Writer) {
|
func printCommandsHelp(w io.Writer) {
|
||||||
fmt.Fprintf(w, "%s", `List of available commands:
|
fmt.Fprintf(w, "%s", `Available commands:
|
||||||
\q - quit
|
\q - quit
|
||||||
\h - show this help
|
\h - show this help
|
||||||
\s - singleline json output mode
|
\s - singleline json output mode
|
||||||
|
@ -260,6 +260,8 @@ func printCommandsHelp(w io.Writer) {
|
||||||
\c - compact output
|
\c - compact output
|
||||||
\logfmt - logfmt output mode
|
\logfmt - logfmt output mode
|
||||||
\tail <query> - live tail <query> results
|
\tail <query> - live tail <query> results
|
||||||
|
|
||||||
|
See https://docs.victoriametrics.com/victorialogs/querying/vlogscli/ for more details
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue