有没有办法从wss或苔藓中的服务器场中的所有服务器获取ULS日志。我需要使用C#以编程方式获取日志。我可以从服务器场中的一台服务器获取日志,但我需要所有这些日志。任何帮助赞赏。ULS登录sharepoint 2007
3
A
回答
4
您可以使用ULS查看:http://ulsviewer.codeplex.com/
或者您可以使用从评论SPDiagnosticsService
http://msdn.microsoft.com/en-us/library/gg512103.aspx
编辑写自己的日志服务:
直接读取文件,你可以做:
try
{
// Create an instance of StreamReader to read from a file.
// The using statement also closes the StreamReader.
using (StreamReader sr = new StreamReader("FilePath:\\SharePointlogfile.uls"))
{
string line;
// Read and display lines from the file until the end of
// the file is reached.
while ((line = sr.ReadLine()) != null)
{
Console.WriteLine(line);
}
}
}
catch (Exception e)
{
// Let the user know what went wrong.
Console.WriteLine("The file could not be read:");
Console.WriteLine(e.Message);
}
http://msdn.microsoft.com/en-us/library/system.io.streamreader.aspx
相关问题
- 1. 编程登录到SharePoint ULS
- 2. SharePoint 2007中:单点登录异常
- 3. sharepoint 2007登录/注销统计
- 4. Sharepoint 2013 - 无ULS日志
- 5. SHAREPOINT 2007 - 记录只读
- 6. InfoPath 2007&Sharepoint 2007
- 7. Sharepoint登录
- 8. 是否有登录尝试sharepoint 2007的日志?
- 9. jquery SPGetCurrentUser()获取sharepoint 2007中当前登录的用户名
- 10. 在Sharepoint 2007中显示弹出窗体登录
- 11. SharePoint 2013:无法找到ULS .log或.log目录
- 12. 从ASP.NET网站登录Sharepoint
- 13. 关于Sharepoint登录
- 14. 的Sharepoint desinger 2007与SharePoint 2007 serverssss
- 15. Sharepoint的用户名/密码登录
- 16. 我得到的SharePoint ULS日志的异常,当模拟在SharePoint
- 17. SharePoint 2007 Versions.aspx
- 18. SharePoint Designer 2007中
- 19. SharePoint 2007的core.css
- 20. SharePoint 2007/2010
- 21. SharePoint 2007:Calulated Column
- 22. Moving Sharepoint 3.0 2007
- 23. jQuery与Sharepoint 2007
- 24. Webpart-sharepoint 2007
- 25. Sharepoint的默认登录域
- 26. SharePoint中心管理登录
- 27. 从SharePoint登录到TextFile
- 28. Sharepoint 2010本地 - 登录
- 29. iOS Sharepoint App登录错误
- 30. SharePoint集成单点登录
http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/1acfe853-5da7-4a4e-9097-d99b6dfd3b79我读过这篇文章,但它也没有为我工作。任何想法 – Alexandr