Fixed some bugs relating to new Filepath of Applicationdata

This commit is contained in:
2023-05-21 15:14:25 +02:00
parent 715cf1f4f3
commit b5bd5d6126
2 changed files with 14 additions and 7 deletions

View File

@ -15,11 +15,17 @@ public static class Tranga_Cli
public static void Main(string[] args)
{
string applicationFolderPath = Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Tranga");
string logMessageFolderPath = Path.Join(applicationFolderPath, "logs");
string logsFolderPath = Path.Join(applicationFolderPath, "logs");
string logFilePath = Path.Join(logsFolderPath, $"log-{DateTime.Now:dd-M-yyyy-HH-mm-ss}.txt");
string settingsFilePath = Path.Join(applicationFolderPath, "data.json");
Logger logger = new(new[] { Logger.LoggerType.FileLogger }, null, null,
Path.Join(logMessageFolderPath, $"log-{DateTime.Now:dd-M-yyyy-HH-mm-ss}.txt"));
Directory.CreateDirectory(applicationFolderPath);
Directory.CreateDirectory(logsFolderPath);
Console.WriteLine($"Logfile-Path: {logFilePath}");
Console.WriteLine($"Settings-File-Path: {settingsFilePath}");
Logger logger = new(new[] { Logger.LoggerType.FileLogger }, null, null, logFilePath);
logger.WriteLine("Tranga_CLI", "Loading Taskmanager.");
TaskManager.SettingsData settings;