public String createFieldMappingErrorMsg(Object srcObj, FieldMap fieldMapping, Object srcFieldValue, Object destObj) {
        String srcClassName = null;
        if (srcObj != null) {
            srcClassName = srcObj.getClass().getName();
        }

        String srcValueType;
        String srcFieldValueString = null;
        if (srcFieldValue != null) {
            srcValueType = srcFieldValue.getClass().toString();
            //1797808 - If an error occurs calling src value toString(), eat the error and still log the dozer error msg
            try {
                srcFieldValueString = srcFieldValue.toString();
            } catch (Exception e) {
                log.error("An exception occurred invoking toString() on the source field value: " + srcFieldValue.getClass().getName(), e);
                srcFieldValueString = "Unable to determine source field value";
            }
        } else {
            srcValueType = fieldMapping.getSrcFieldType();
        }

        String destClassName = null;
        if (destObj != null) {
            destClassName = destObj.getClass().getName();
        }

        String destFieldTypeName = null;
        try {
            if (destObj != null) {
                destFieldTypeName = fieldMapping.getDestFieldType(destObj.getClass()).getName();
            }
        } catch (Exception e) {
            log.warn("Unable to determine dest field type when build log.error message");
        }

        return "Field mapping error -->" + "\n  MapId: " + fieldMapping.getMapId() + "\n  Type: " + fieldMapping.getType()
               + "\n  Source parent class: " + srcClassName + "\n  Source field name: " + fieldMapping.getSrcFieldName()
               + "\n  Source field type: " + srcValueType + "\n  Source field value: " + srcFieldValueString + "\n  Dest parent class: "
               + destClassName + "\n  Dest field name: " + fieldMapping.getDestFieldName() + "\n  Dest field type: " + destFieldTypeName;
    }
Internal class used to build various types of log messages. Only intended for internal use.
core/src/main/java/com/github/dozermapper/core/util/LogMsgFactory.java