Hidistro.UI.Web/API/TLog_Clock.cs
(完整代码) 2KBnamespace Hidistro.UI.Web.API
{
using System;
using System.IO;
public class TLog_Clock
{
public static string AppPath = "";
public static string LogFile = "JobLog_Clock.log";
public static void SaveLog(string cdmstring)
{
try
{
LogFile = AppPath + "/log/" + DateTime.Today.ToString("yyyyMMdd") + "_Clock.log";
FileInfo info = new FileInfo(LogFile);
string nodeValue = "1";
try
{
nodeValue = XmlHelper.GetNodeValue(AppPath + "/JobConfig.xml", "CronSchedule_Clock");
}
catch (Exception)
{
}
if (nodeValue == "2")
{
using (FileStream stream = info.Create())
{
StreamWriter writer = new StreamWriter(stream);
writer.BaseStream.Seek(0L, SeekOrigin.End);
writer.WriteLine("=====================================");
writer.Write("时间:" + DateTime.Now.ToString() + "\r\n");
writer.Write("内容:" + cdmstring + "\r\n");
writer.WriteLine("=====================================");
writer.Flush();
writer.Close();
return;
}
}
using (FileStream stream2 = info.OpenWrite())
{
StreamWriter writer2 = new StreamWriter(stream2);
writer2.BaseStream.Seek(0L, SeekOrigin.End);
writer2.WriteLine("=====================================");
writer2.Write("时间:" + DateTime.Now.ToString() + "\r\n");
writer2.Write("内容:" + cdmstring + "\r\n");
writer2.WriteLine("=====================================");
writer2.Flush();
writer2.Close();
}
}
catch (Exception)
{
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
