Forced due to logging gap {0}

I have seen this error appearing many times in the SharePoint ULS logs and often wondered why the {0} is never replaced with a value. Turns out someone has already carried out this investigation already in this excellent blog post:

“_ULS_EXPAND_FORCED_LOGGING_MESSAGES_” Environment Variable Explained

I would recommend reading the blog post in it’s entirety but basically to get this value to populate you need to add an environmental variable. The easiest way is to use the Powershell Script in the article:

[System.Environment]::SetEnvironmentVariable(“_ULS_EXPAND_FORCED_LOGGING_MESSAGES_”, “true”, “Machine”)

Leave a Reply

Your email address will not be published. Required fields are marked *