Simplify log warning code, include record info