package com.yifu.cloud.plus.v1.nginx.util;

import com.yifu.cloud.plus.v1.nginx.service.NginxLogService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * @Author fxj
 * @Date 2024/2/27
 * @Description
 * @Version 1.0
 */
@Log4j2
@Component
public class NginxLogCommandLineRunner implements CommandLineRunner {
	@Autowired
	NginxLogService nginxLogService;
	@Override
	public void run(String... args) throws Exception {
		nginxLogService.readAndWriteLogAsys();
	}
}
