mirror of
https://github.com/JuniorDark/RustyHearts-Launcher.git
synced 2026-05-07 05:21:44 -04:00
Version 1.2.0
This commit is contained in:
parent
9b3a0e00a2
commit
e74d93fab9
83 changed files with 110087 additions and 47507 deletions
|
|
@ -1,4 +1,4 @@
|
|||
namespace RHLauncher.Helper;
|
||||
namespace RHLauncher.RHLauncher.Helper;
|
||||
|
||||
public class Logger
|
||||
{
|
||||
|
|
@ -13,10 +13,14 @@ public class Logger
|
|||
// Create log file with today's date
|
||||
logFilePath = Path.Combine(logFilePath, "Log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".txt");
|
||||
FileInfo logFileInfo = new(logFilePath);
|
||||
DirectoryInfo logDirInfo = new(logFileInfo.DirectoryName);
|
||||
if (!logDirInfo.Exists)
|
||||
|
||||
if (logFileInfo.DirectoryName != null)
|
||||
{
|
||||
logDirInfo.Create();
|
||||
DirectoryInfo logDirInfo = new(logFileInfo.DirectoryName);
|
||||
if (!logDirInfo.Exists)
|
||||
{
|
||||
logDirInfo.Create();
|
||||
}
|
||||
}
|
||||
|
||||
// Write log entry to file
|
||||
|
|
@ -28,4 +32,5 @@ public class Logger
|
|||
streamWriter.WriteLine("Message: {0}", message);
|
||||
streamWriter.WriteLine("---------------------------");
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue