package com.ruoyi.common.log.service;

import com.ruoyi.system.api.RemoteLogDataExchangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.system.api.domain.SysOperLog;

import static com.ruoyi.common.core.constant.ServiceNameConstants.*;

/**
 * 异步调用日志服务
 * 
 * @author ruoyi
 */
@Service
public class AsyncLogService
{

    @Autowired
    private RemoteLogDataExchangeService remoteLogDataExchangeService;

    /**
     * 保存系统日志记录
     */
    @Async
    public void saveSysLog(SysOperLog sysOperLog) throws Exception
    {
        remoteLogDataExchangeService.saveLog(sysOperLog, SecurityConstants.INNER);
    }
}
