mirror of
https://github.com/kubernetes/kubectl.git
synced 2026-06-09 00:32:30 -04:00
Merge pull request #97895 from lauchokyip/fixlog
Moving kubectl logs Long command into variable Kubernetes-commit: 106bc7e50d6dfdacbaa4be93f35c1af7a946a10d
This commit is contained in:
commit
d714e3a5d6
1 changed files with 5 additions and 1 deletions
|
|
@ -46,6 +46,10 @@ const (
|
|||
)
|
||||
|
||||
var (
|
||||
logsLong = templates.LongDesc(i18n.T(`
|
||||
Print the logs for a container in a pod or specified resource.
|
||||
If the pod has only one container, the container name is optional.`))
|
||||
|
||||
logsExample = templates.Examples(i18n.T(`
|
||||
# Return snapshot logs from pod nginx with only one container
|
||||
kubectl logs nginx
|
||||
|
|
@ -146,7 +150,7 @@ func NewCmdLogs(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.C
|
|||
Use: logsUsageStr,
|
||||
DisableFlagsInUseLine: true,
|
||||
Short: i18n.T("Print the logs for a container in a pod"),
|
||||
Long: i18n.T("Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional."),
|
||||
Long: logsLong,
|
||||
Example: logsExample,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
cmdutil.CheckErr(o.Complete(f, cmd, args))
|
||||
|
|
|
|||
Loading…
Reference in a new issue