I've found that SharePoint Foundation 2013 has some problems with Logging to ULS. Whenever I try to case an exception on the website using GUI or I want to write a message to ULS from a webpart nothing gets logged to ULS.
How to reproduce without any custom code:
- Go to any list
- go to any list item
- replace the ID in the url to one that does not exist
- you'll get an error:
I've managed to reproduce this problem on all Foundation servers I could get my hads not. This includes:
- SharePoint 2013 Foundation SP1 (rereleased)
- SharePoint 2013 Foundation March 2015 CU: 15.0.4701.1000
- SharePoint 2013 Foundation April 2015 CU: 15.0.4711.1000
- I can write Logs to ULS from Console apps or Powershell with no problems
- there are many useless logs from w3wp.exe and OWSTIMER.exe in ULS, but those are not exceptions, just some infromational spam
- Windows logs or ULS do not contain any hints as to what is going on. I've looked very carefully.
- clearing SharePoint cache does not help
- running SharePoint wizard does not help
- app pool account is a member Performance Monitor Users
- we have one farm with 2 WFE where only one of the servers gets logs written properly
- the problem has nothing to to with logging categories because this problem occures even when I causing it manually via standard OOB GUI (mentioned above).
There is a similar(but not duplicate) question with my bounty. You can answer there as well to get it.