Skip to content

Commit

Permalink
Merge pull request #240 from nyrahul/main
Browse files Browse the repository at this point in the history
consistent use of short/long options
  • Loading branch information
nyrahul authored Jan 12, 2023
2 parents 47c2cde + f56cd58 commit 2ba3af6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var logOptions log.Options

// logCmd represents the log command
var logCmd = &cobra.Command{
Use: "log",
Use: "logs",
Short: "Observe Logs from KubeArmor",
Long: `Observe Logs from KubeArmor`,
RunE: func(cmd *cobra.Command, args []string) error {
Expand All @@ -32,13 +32,13 @@ func init() {
logCmd.Flags().StringVar(&logOptions.LogPath, "logPath", "stdout", "Output location for alerts and logs, {path|stdout|none}")
logCmd.Flags().StringVar(&logOptions.LogFilter, "logFilter", "policy", "Filter for what kinds of alerts and logs to receive, {policy|system|all}")
logCmd.Flags().BoolVar(&logOptions.JSON, "json", false, "Flag to print alerts and logs in the JSON format")
logCmd.Flags().StringVar(&logOptions.Namespace, "namespace", "", "Specify the namespace")
logCmd.Flags().StringVarP(&logOptions.Namespace, "namespace", "n", "", "k8s namespace filter")
logCmd.Flags().StringVar(&logOptions.Operation, "operation", "", "Give the type of the operation (Eg:Process/File/Network)")
logCmd.Flags().StringVar(&logOptions.LogType, "logType", "", "Log type you want (Eg:ContainerLog/HostLog) ")
logCmd.Flags().StringVar(&logOptions.ContainerName, "container", "", "name of the container ")
logCmd.Flags().StringVar(&logOptions.PodName, "pod", "", "name of the pod ")
logCmd.Flags().StringVar(&logOptions.Resource, "resource", "", "command used by the user")
logCmd.Flags().StringVar(&logOptions.Source, "source", "", "binary used by the system ")
logCmd.Flags().Uint32Var(&logOptions.Limit, "limit", 0, "number of logs you want to see")
logCmd.Flags().StringArrayVarP(&logOptions.Selector, "selector", "l", []string{}, "use the label to get the particular log")
logCmd.Flags().StringSliceVarP(&logOptions.Selector, "labels", "l", []string{}, "use the labels to select the endpoints")
}

0 comments on commit 2ba3af6

Please sign in to comment.