1
This commit is contained in:
24
NetPanel.Help/LogHeler.cs
Normal file
24
NetPanel.Help/LogHeler.cs
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user