This commit is contained in:
c
2023-07-29 21:59:37 +08:00
parent ce27f1d693
commit 15c0aa1c5c
12 changed files with 367 additions and 65 deletions

24
NetPanel.Help/LogHeler.cs Normal file
View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace NetPanel.Help
{
public class LogHeler
{
public static void Set(string name, string str)
{
string sPath = AppContext.BaseDirectory + "/Log";
File.AppendAllText(sPath + "/"+ name + "_" + DateTime.Now.ToString("yyyyMMdd") + ".txt", "[" + DateTime.Now.ToString() + "]:" + str + "\r\n", Encoding.UTF8);
}
public static void SelErrt(string str)
{
Set("Errt",str);
}
}
}