Files
NetPanel/NetPanel.Help/LogHeler.cs
2023-07-29 21:59:37 +08:00

25 lines
615 B
C#

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);
}
}
}