예제 #1
0
파일: Program.cs 프로젝트: Wolfteam/CastIt
        public static void Main(string[] args)
        {
            var logs = new List <FileToLog>
            {
                new FileToLog(typeof(MainService), "service_main")
            };

            logs.AddRange(DependencyInjection.GetServerLogs());
            logs.AddRange(Infrastructure.DependencyInjection.GetInfrastructureLogs());
            logs.AddRange(Application.DependencyInjection.GetApplicationLogs());
            logs.SetupLogging(AppFileUtils.GetServerLogsPath());

            Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
            CreateHostBuilder(args).Build().Run();
        }
예제 #2
0
 public void DeleteServerLogsAndPreviews()
 {
     DeleteFilesInDirectory(GetPreviewsPath(), DateTime.Now.AddDays(-1));
     DeleteFilesInDirectory(AppFileUtils.GetServerLogsPath(), DateTime.Now.AddDays(-3));
 }