package com.tofly.base.api.feign.fallback;

import com.tofly.base.api.entity.Log;
import com.tofly.base.api.feign.BaseLogService;
import com.tofly.common.core.entity.ResultRespone;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.springframework.stereotype.Component;

/**
 * @author Administrator
 * @date 2019/9/3  15:01
 */
@Slf4j
@Component
public class BaseLogServiceFallbackImpl implements BaseLogService {

    private static final Logger logs = org.slf4j.LoggerFactory.getLogger(BaseLogServiceFallbackImpl.class);

    @Setter
    private Throwable throwable;

    @Override
    public ResultRespone saveLog(Log log, String from) {
        logs.error("插入日志失败",throwable);
        return null;
    }
}
