This blog post describes how set the SharePoint’s ULS level to “Extra Verbose” (VerboseEx) using PowerShell. This is not possible using the browser UI, so some POSH magic is required! Luckily, it’s quite straightforward, but to avoid filling your hard drive(s) with huge log files, you should reset the level when you’re done debugging!
Description of the solution
By default, ULS logging is somewhat non-detailed. This means that a lot of data that could be used to debug issues is omitted. The UI cannot be used to set this level of logging to “Extra Verbose” – it is limited to verbose. In case you really, REALLY need to get all the data logged to ULS, you can use PowerShell to enable VerboseEx -level tracing, using the following command:
Set-SPLogLevel -TraceSeverity VerboseEx
Beware, though: this will generate a lot of data, and it’s likely you won’t be able to do anything with the log files using notepad++ or similar tool, as a single file can be hundreds of megabytes, and handling that might get a little tricky.
How to reset the Logging verbosity from “extra verbose” to medium?
So now you have the logs you needed – that’s great! SharePoint will keep logging everything, though, and will eventually fill your hard drives with extra verbose data, that’s really not needed for your normal operations. It’s a good idea to undo the setting you just did!
Luckily enough, you can always reset this setting to default (medium-level tracing) by running the following command:
Other logging levels available
If you want to use any other level instead, you can just run the “Set-SPLogLevel -TraceSeverity” with any of these values:
ULS Level Name
Similar to an Assert (an assumption in code that a condition is true at a particular point), this message indicates that a logic check failed that is atypical, or the message returns an unexpected error code. These generally represent code bugs that should be investigated and fixed.
Traces that indicate a problem, but do not need immediate investigation. The intent is to collect data and analyze it over time, looking for problem trends.
General functional detail, the high priority events that happen in the environment. Examples include global configuration modifications, service start and stop, timer jobs completed, and so on.
Useful to help support or test teams debug customer or environmental issues. These likely include messages indicating that individual features have succeeded or failed, such as creating a new list, modifying a page, and so on.
Useful primarily to help developers debug low-level code failures. Not generally useful to anyone who does not have access to source code or symbols. Most event tracing that does not need to be enabled all the time should be set at the Verbose level.
Useful for traces that are likely to be high volume, especially information that is not needed for all debugging scenarios. Examples of situations where you should use the VerboseEx setting are method entry and exit events, tracing in loops, or to relay information that is not useful to developers outside your team.
Useful resources for further reading
More info about the trace levels:
- MSDN article on the levels: https://msdn.microsoft.com/en-us/library/office/ff604025(v=office.14).aspx
Latest posts by Antti K. Koskela (see all)
- How to fix an Office Group with no Owners - November 14, 2018
- Help! My “Content and Structure” page in SharePoint Online is gone! - November 7, 2018
- Thanks for coming to my session at SPS New England 10/20 ! - October 20, 2018
- Speaking at SPS New England on 10/20! - October 17, 2018