Skip to content

Commit

Permalink
log command start/end
Browse files Browse the repository at this point in the history
  • Loading branch information
cppforlife committed Oct 2, 2019
1 parent c82624f commit 707522e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/kapp/cmd/kapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ func NewKappCmd(o *KappOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Comman
cmd.AddCommand(NewWebsiteCmd(NewWebsiteOptions()))

// Last one runs first
cobrautil.VisitCommands(cmd, func(cmd *cobra.Command) {
origRunE := cmd.RunE
cmd.RunE = func(cmd2 *cobra.Command, args []string) error {
defer o.logger.DebugFunc("CommandRun").Finish()
return origRunE(cmd2, args)
}
})

cobrautil.VisitCommands(cmd, cobrautil.ReconfigureCmdWithSubcmd)
cobrautil.VisitCommands(cmd, cobrautil.ReconfigureLeafCmd)

Expand Down

0 comments on commit 707522e

Please sign in to comment.