Skip to content

Commit 71dc303

Browse files
Add detection logging messages at info level (#196)
1 parent 93c2505 commit 71dc303

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lein/detect.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package lein
1818

1919
import (
2020
"fmt"
21+
"github.com/paketo-buildpacks/libpak/bard"
2122
"os"
2223
"path/filepath"
2324

@@ -34,9 +35,11 @@ const (
3435
type Detect struct{}
3536

3637
func (Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error) {
38+
l := bard.NewLogger(os.Stdout)
3739
file := filepath.Join(context.Application.Path, "project.clj")
3840
_, err := os.Stat(file)
3941
if os.IsNotExist(err) {
42+
l.Logger.Infof("SKIPPED: project.clj could not be found in %s", file)
4043
return libcnb.DetectResult{Pass: false}, nil
4144
} else if err != nil {
4245
return libcnb.DetectResult{}, fmt.Errorf("unable to determine if %s exists\n%w", file, err)

0 commit comments

Comments
 (0)