class AuditLogServiceImpl extends AbstractBaseService<AuditLogEntity> implements AuditLogService {

	@Override
	public long insert(AuditLogEntity entity) {
		log.info("tbname_{}_refid_{},content is {},by {}", entity.getTbName(), entity.getRefId(),
				entity.getContent().replaceAll(" ", "_").replaceAll("\\|", "_").replaceAll("\\.", "_"),
				entity.getInsertBy());
		try {
			if(entity.getContent()!=null&&entity.getContent().length()>5000) {
				log.info("log_insert_spec");
				entity.setContent(entity.getContent().substring(0,5000));
			}
			return super.insert(entity);
		} catch (Exception e) {
			log.error("log_insert", e);
			return 0;
		}
	}

}