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]
jdk 1.7
Merge commit 'cbde1199454482eac4d73cea6174f841d34a58bb'