How To Write In Sharepoint Log File 怎么对自定义的MOSS代码写日志
How To Write In Sharepoint Log File 怎么对自定义的MOSS代码写日志
Add Microsoft.Office.Server dll in your project, you can find this dll under “\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\”.
The log files are found under \Common Files\Microsoft Shared\Web Server Extensions\12\Log\. Following line of code is used to write exception in sharepoint default log file.
1 | Microsoft.Office.Server.Diagnostic.PortalLog.LogString("Exception - {0} - {1} - {2}","User Friendly Message",ex.Message,ex.StackTrace); |
作者:johnny
出处:http://www.cnblogs.com/sunjunlin
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步