You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate logs command parameters to match journalctl
Moves some of the flags for the logs commands to align more
closely with the journalctl syntax and fixes some typos in
the original.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
cmd.Flags().Var(&logFlagValues.logFormat, "format", "output format. Note that JSON format will always include all log message keys (plain|key-value|json)")
85
+
cmd.Flags().VarP(&logFlagValues.logFormat, "output", "o", "output logs as (plain|keyvalue|json), JSON includes all available keys")
86
86
cmd.Flags().Var(&logFlagValues.timeFormat, "time-format", "string format for the timestamp, any value go time format string is allowed, empty will not print the timestamp")
87
87
cmd.Flags().BoolVar(&logFlagValues.includeName, "name", false, "print the function name")
88
88
cmd.Flags().BoolVar(&logFlagValues.includeInstance, "instance", false, "print the function instance name/id")
{"can limit number of messages returned", []string{"funcFoo", "--lines=5"}, logs.Request{Name: "funcFoo", Follow: true, Tail: 5}},
27
27
{"can set timestamp to send logs since using duration", []string{"funcFoo", "--since=5m"}, logs.Request{Name: "funcFoo", Follow: true, Tail: -1, Since: &fiveMinAgo}},
28
28
{"can set timestamp to send logs since using timestamp", []string{"funcFoo", "--since-time="+fiveMinAgoStr}, logs.Request{Name: "funcFoo", Follow: true, Tail: -1, Since: &fiveMinAgo}},
0 commit comments