Skip to content

Commit

Permalink
Logger in hook public
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Okhlopkov <[email protected]>
  • Loading branch information
Pavel Okhlopkov committed Oct 24, 2024
1 parent 47cf7ec commit 52d0376
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/hook/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ type Hook struct {

TmpDir string

logger *unilogger.Logger
Logger *unilogger.Logger
}

func NewHook(name, path string, logger *unilogger.Logger) *Hook {
return &Hook{
Name: name,
Path: path,
Config: &config.HookConfig{},
logger: logger,
Logger: logger,
}
}

Expand Down Expand Up @@ -142,7 +142,7 @@ func (h *Hook) Run(_ BindingType, context []BindingContext, logLabels map[string

result := &Result{}

result.Usage, err = executor.RunAndLogLines(hookCmd, logLabels, h.logger)
result.Usage, err = executor.RunAndLogLines(hookCmd, logLabels, h.Logger)
if err != nil {
return result, fmt.Errorf("%s FAILED: %s", h.Name, err)
}
Expand Down

0 comments on commit 52d0376

Please sign in to comment.