Issuing warnings using logger

Fix the corresponding testcase to clear buildpack.log before each
test and check the log for the required output.

[#54192868]
Merge 54192868- to master

[Completes #54192868]