How To Write In Sharepoint Log File 怎么对自定义的MOSS代码写日志
Add Microsoft.Office.Server dll in your project, you can find this dll under “Common FilesMicrosoft SharedWeb Server Extensions12ISAPI”.
The log files are found under Common FilesMicrosoft SharedWeb Server Extensions12Log. Following line of code is used to write exception in sharepoint default log file.
Microsoft.Office.Server.Diagnostic.PortalLog.LogString("Exception - {0} - {1} - {2}","User Friendly Message",ex.Message,ex.StackTrace);