feat: Introduce initial implementation of URL notes grabber console application with database and API integration.
This commit is contained in:
@@ -23,6 +23,12 @@ namespace URLNotesGrabberCORE
|
|||||||
|
|
||||||
// Setup Dual Logging
|
// Setup Dual Logging
|
||||||
string logPath = "console_output.log";
|
string logPath = "console_output.log";
|
||||||
|
if (File.Exists(logPath))
|
||||||
|
{
|
||||||
|
string timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss");
|
||||||
|
string newPath = $"console_output_{timestamp}.log";
|
||||||
|
File.Move(logPath, newPath);
|
||||||
|
}
|
||||||
StreamWriter fileWriter = new StreamWriter(logPath, append: false) { AutoFlush = true };
|
StreamWriter fileWriter = new StreamWriter(logPath, append: false) { AutoFlush = true };
|
||||||
DualLogger dualLogger = new DualLogger(Console.Out, fileWriter);
|
DualLogger dualLogger = new DualLogger(Console.Out, fileWriter);
|
||||||
Console.SetOut(dualLogger);
|
Console.SetOut(dualLogger);
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user