电脑桌面
添加蚂蚁七词文库到电脑桌面
安装后可以在桌面快捷访问

自定义写日志方法

来源:金蝶云社区作者:金蝶2024-09-164

自定义写日志方法

标准产品日志太多,自定义一个写日志到 安装目录\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格式

声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

已经是第一篇
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息
QQ群
  • 答案:my7c点击这里加入QQ群
支持邮箱
微信
  • 微信