Replace printStackTrace with getLogger().log() (#12147)

Change-Id: I9ec61fdc7ddc06f129a9d69b99e6295a62c4b0d3