You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.3 KiB
C#

using Ems.CollectService.Entity.config;
using Ems.CollectService.Redis;
using Ems.CollectService.SqlSugarCore;
using Ems.CollectService.Timer;
using Ems.CollectService.TouchSocket;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Logging;
using Newtonsoft.Json;
using NLog;
using NLog.Web;
using SqlSugar;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection.Metadata;
namespace Ems.CollectService
{
internal class Program
{
private static Logger logger = LogManager.GetCurrentClassLogger();
private static TcpServer service = TcpServer.Instance;
private static AppConfig appConfig = AppConfig.Instance;
private static DeleteLogFile deleteLogFile = DeleteLogFile.Instance;
static void Main(string[] args)
{
try
{
service.Init(appConfig.listenerPort);
//定时删除日志文件夹
deleteLogFile.DeleteLogFileTimer();
}
catch (Exception ex)
{
logger.Error($"服务启动异常{ex.Message}");
}
Console.ReadLine();
}
}
}