Merge "sdm: Fix conditional logging of error and warning logs"