mirror of
https://github.com/EnderIce2/SDR-RPC.git
synced 2025-07-11 22:59:14 +00:00
Small bug fix and added option to disable the invite feature
This commit is contained in:
16
LogWriter.cs
16
LogWriter.cs
@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EnderIce2.SDRSharpPlugin
|
||||
{
|
||||
@ -21,17 +17,13 @@ namespace EnderIce2.SDRSharpPlugin
|
||||
string filepath = AppDomain.CurrentDomain.BaseDirectory + "\\RPCLogs\\DiscordRPCLog_" + DateTime.Now.Date.ToShortDateString().Replace('/', '_') + ".log";
|
||||
if (!File.Exists(filepath))
|
||||
{
|
||||
using (StreamWriter sw = File.CreateText(filepath))
|
||||
{
|
||||
sw.WriteLine($"[{DateTime.Now}] {Message}");
|
||||
}
|
||||
using StreamWriter sw = File.CreateText(filepath);
|
||||
sw.WriteLine($"[{DateTime.Now}] {Message}");
|
||||
}
|
||||
else
|
||||
{
|
||||
using (StreamWriter sw = File.AppendText(filepath))
|
||||
{
|
||||
sw.WriteLine($"[{DateTime.Now}] {Message}");
|
||||
}
|
||||
using StreamWriter sw = File.AppendText(filepath);
|
||||
sw.WriteLine($"[{DateTime.Now}] {Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user