In Christophe’s recent blog about logs he explained how to turn them off. Sometimes though we need to turn the volume up and get a plenty of detail of what is going on. But be careful – these things can get very big very fast! The settings can be found in SharePoint Central Administration, Operations, Diagnostic Logging. I would recommend only setting specific categories to “Verbose” and then only when you are looking for something in particular. To give you an idea a busy server can easily write 5GB of logs in 30 minutes if ALL categories are set to “Verbose”! This is equivalent to around 7.5 million lines of output.
These logs are often called ULS logs (Unified logging system?) in case you are ever asked for them. My tool of choice to read these log files (which are by default written to c:program filescommon filesMicrosoft sharedweb server extensions12logs) is Excel 2007. This latest version can now cope with just over a million rows – so anything up to about a 600K log file should be manageable. If you find that monitoring all the things you want takes your files over this size then you can change the number of minutes to use a log down from 30 to 15 or 10. Once in Excel I use a macro to set the column widths and text wrapping and then finally apply a filter – so that I can select different event Areas, Categories or Level of trace messages. For instance filtering on Level = critical, exception and high is a quick way to find bad stuff.
My macro is stored in personal.xslb so is available whenever I open Excel – and I make Excel the default application for .log files. My macro is simply:-
' ULS Macro
' Keyboard Shortcut: Ctrl+Shift+U
Selection.ColumnWidth = 80
Selection.WrapText = True
Columns("B:B").ColumnWidth = 26.43
Columns("A:A").ColumnWidth = 10.29
In 2007 Macros are under the “View” part of the ribbon – and the option to unhide personal.xlsb is also on the same ribbon.
Take a look at your logs now – before you need to. And write that macro (or copy mine). I lost count of how many times I thought “Next time I must write a macro to do this…”
Technorati Tags: Project Server 2007