This post was most recently updated on September 30th, 2022.
3 min read.This blog post describes how to set 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 (SharePoint Management Shell) to enable VerboseEx -level tracing, using the following command:
Set-SPLogLevel -TraceSeverity VerboseEx
Don’t worry if that takes a while – it’s perfectly normal for this command to take a few minutes to finish for whatever reasons.
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 a 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 that 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:
Clear-SPLogLevel
Just like before, this might take a few minutes to finish.
Other available logging levels
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 |
Level ID |
Description |
---|---|---|
Unexpected |
10 |
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. |
Monitorable |
15 |
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. |
High |
20 | 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. |
Medium |
50 |
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. |
Verbose |
100 |
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. |
VerboseEx |
200 | 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 relaying 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
- M365 Copilot claiming “You have turned off web search in the work mode”? Easy fix! - November 19, 2024
- “Performing cleanup” – Excel is stuck with an old, conflicted file and will never recover. - November 12, 2024
- How to add multiple app URIs for your Entra app registration? - November 5, 2024