Lately I have been posting a few articles related to how the new Sharepoint Logging database worked and how to configure it to store the ULS logs. In these articles we have seen how the ULS Trace tables are populated by a diagnostics timer job and also how was the data stored in the different partition tables. The reason why I have been interested in this topic is because I have been working on a tool to surface the ULS data stored in the database in a administration page accessible from my Central Administration. I thought it would be a great idea to share it so feel free to download it if you also find it useful.
The tool is distributed as a .wsp solution file that needs to be deployed to the Sharepoint Portal. To do so we can use the usual Add-SPSolution powershell command to install it and then deploy it using Central Admin. Once deployed, a new menu option will be created under the Monitoring section of Central Administration:
From there we can first navigate the settings page where we can configure different settings of the application. From there we can navigate to the timer job responsible for populating the ULS tables and enable it if not started. Also important is to set up the minimum severity level for the logs that will be populated in the database. Finally we can also configure certain settings of the Logging database such as the max size or the retention period.
The Logs page is pretty straightforward. By default it displays the last logs populated in the database. We can use the search panel for filtering the result based on different critera. Worth mentioning is the Populate Logs button, when clicked this will trigger the execute method of the timer job that populates the logging database. This will update the ULS tables with the most recent data from the ULS logs, however bear in mind that this will only be executed on the server where Central Administration is being hosted and not on every server of the Sharepoint Farm.
And finally, click here to download the solution file: v.1.0 ORiSOFT.LogViewer.wsp
Created on 13/06/2011