自定义写日志方法

标准产品日志太多,自定义一个写日志到 安装目录\K3Cloud\WebSite\Log ,每天写一个log文件
private void WriteLog(string log, string strType = "")
{
string rootPath = AppDomain.CurrentDomain.BaseDirectory;
//这个rootPath 老版本 最后无 \ 新版本有? 另外因权限问题,最好是手工创建并授权
string logPath; // = rootPath + $@"\Log";
if(rootPath.Substring(rootPath.Length - 1,1).Equals(@"\"))
{
logPath = rootPath + $@"Log";
}
else
{
logPath = rootPath + $@"\Log";
}
if (!Directory.Exists(logPath))
Directory.Cr自定义写日志方法
标准产品日志太多,自定义一个写日志到 安装目录\K3Cloud\WebSite\Log ,每天写一个log文件 private void WriteLog(string log, string ...
点击下载文档文档为doc格式
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
上一篇
已经是第一篇



