Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds detection logging messages at info level #344

Merged
merged 2 commits into from
May 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Adds logger to ConfigurationResolver & extra log message
  • Loading branch information
pivotal-david-osullivan committed May 18, 2023
commit 649034b1b814e3244de54c5e949c9bd6917a421b
3 changes: 2 additions & 1 deletion tomcat/detect.go
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ type Detect struct {
}

func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error) {
cr, err := libpak.NewConfigurationResolver(context.Buildpack, nil)
cr, err := libpak.NewConfigurationResolver(context.Buildpack, &d.Logger)
if err != nil {
return libcnb.DetectResult{}, fmt.Errorf("unable to create configuration resolver\n%w", err)
}
@@ -85,6 +85,7 @@ func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error
if _, err := os.Stat(file); err != nil && !os.IsNotExist(err) {
return libcnb.DetectResult{}, fmt.Errorf("unable to stat file %s\n%w", file, err)
} else if os.IsNotExist(err) {
d.Logger.Info("PASSED: a WEB-INF directory was not found, this is normal when building from source")
return result, nil
}