Merge branch 'master' of http://www.scserverddns.top:13000/sc/ForwardingServerUI
This commit is contained in:
commit
fc50d39309
3 files changed
+37
-4
No files matched your search
@@ -7,6 +7,25 @@ namespace ForwardingServerUI.Class
|
||||
{
|
||||
public class LogGing
|
||||
{
|
||||
public static void LINKDATA(string path,string User, string dat)
|
||||
{
|
||||
string logpath = System.Environment.CurrentDirectory + "\\DB\\"+path;//日志文件目录
|
||||
string logPath = logpath +"\\" + DateTime.Now.ToString(" yyyy-MM-dd HH-mm-ss-ffff") + User + ".txt";//日志文件
|
||||
|
||||
if (Directory.Exists(logpath))//检查日志路径
|
||||
{
|
||||
FileStream fs = new FileStream(logPath, FileMode.CreateNew, FileAccess.Write);//创建写入文件
|
||||
StreamWriter wr = new StreamWriter(fs);//创建文件
|
||||
wr.WriteLine(dat);
|
||||
wr.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
DirectoryInfo directoryInfo = new DirectoryInfo(logpath);
|
||||
directoryInfo.Create();//创建日志路径
|
||||
}
|
||||
}
|
||||
|
||||
public static void LogGingDATA(string dat)
|
||||
{
|
||||
string logpath = System.Environment.CurrentDirectory + "\\Log";//日志文件目录
|
||||
|
||||
Reference in new issue
Block a user