SharePoint Logger

Ovidiu Becheş-Puia
  • SharePoint Logger Ovidiu Becheş-Puia

    What's your favorite logger when creating SharePoint apps ? I'm using log4net for ex. but I want to know what other software programmers use when building all type of sharepoint apps and why ?!.

  • I currently use ULS logging and prefer it right now. It cleans up after itself and administrators can configure how long logs are kept for through the UI. All logging relating to SharePoint is stored in one location which gives context when an error in my code is caused by a problem in the product itself. The downside is all of those log messages lumped together, but there are many "viewer" tools out there that help with this.

    I've used log4net and Enterprise Library as well which were OK. They both worked pretty similarly, although EntLib was a nightmare to configure and unreliable in my experience. The big advantage with these is that you can e-mail critical errors as well as log to a database, etc. I only had problems with multiple apps logging to the same file (e.g. a web part plus a console app at the same time) where there were locking problems.

  • Enterprise libraries logging! We created a small footprint addon that is simple to use. Advantages are that you can use it as instrumentation for SCOM / MOM and hence treat SharePoint like any other mission critical application. ULS logging IMO tends to be harder to find and harder to read, and does not go well with monitoring tools.

  • I'm using the SharePoint Logging Library at the moment and I'm finding it a great blend of function/flexability.

    It has built in methods for logging the start and end of methods and different levels of logging. And to get started all you need to do is add an assembly/using reference and away you go.

    It writes all the logs to the ULS log which from a development perspective I find is great.

    Anyways saw this question and just thought I'd throw in my 2c.

  • ULS logs for Server errors - for the reasons given above. It's simple, unified, and already there. Better logging would be good, though.

    For client apps - it depends. Log4NET is good, though I've had some issues with in and Office plug-ins I've written.

logging development
Related questions and answers
  • When I go to manage service applications in Central Administration and try to create a new service application like: New > Create a new service application, the link isn't active. My issue is I would... migrated WSS v3 to SharePoint Foundation 2010 and then installed Search Express 2010 on top of it. I am logged in with an account that has full farm administration access. Update 2: I migrated WSS v3 to Sharepoint Foundation 2010 and then installed Search Express 2010 on top of it. Update 3: Yes the farm admin acct is the member of the local admin. What services are required to start to have

  • I am in a position where service credentials change quite a lot, I would normally use central admin to change the credentials but quite often the application pool that runs that is using the same credentials which I want to change. I've tried writing the following powershell script but I always get FALSE as the result of SetPassword. Any ideas what i am doing wrong? $login and $password... $managedaccount -ConfirmPassword $securestring -NewPassword $secureString $Apps = Get-SPWebApplication foreach ($App in $Apps) { $AppPool = $App.ApplicationPool #$AppPool #Write-Host

  • How do you set up Excel Services for SharePoint 2010? I’ve installed the Office Web Apps (wcsetup.exe) and created a new Excel service in central administration. But I’m now stuck on what to do next - do I need to turn it on in a document library?

  • I try to perform a restore using stsadm. When the operation completes, I get the following message: Restore failed for Object [Sharepoint Database Name] in event OnPostRestore. For more information, see the error log located in the backup directory. However, I am unable to find the error log. What is the "backup directory" that the message mentions? Also, it appears like the error has to do with my SP database. What could be causing it? Thanks!

  • I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise, and I am using publishing portal template. I am using SharePoint Designer 2007 to design pages. When I open the default.aspx under Pages sub-folder of a site, there are two options: Edit in Browser and Edit Page Layout. I want to know what are the differences between Edit in Browser and Edit Page Layout -- especially what is the function of Edit Page Layout, because when I select Edit Page Layout, WelcomeSplash.aspx opens in SharePoint Designer, other than default.aspx itself (very confused). thanks

  • In one of my SharePoint apps, I am getting this warning & stacktrace over and over (with different GUIDS): since it's only one of my apps, I assume there's something in my project's code, but SPDisposeCheck returns clean, and there's nothing in the logs that point to my code. Any ideas on how I can track this down? Error I'm getting: Potentially excessive number of SPRequest objects...() at Microsoft.SharePoint.Publishing.WebControls.XmlConsoleDataSource.OnLoad(EventArgs e) at Microsoft.SharePoint.Publishing.WebControls.ConsoleDataSource.ForceInitLoad(EventArgs e

  • I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I met with strange SharePoint internal error when click some links on a web site. I have tried to use SPTraceView ( to dump related logs, I find the following error logs, any ideas what is wrong? I am not sure whether in my scenario, using SPTraceView is the best way to diagnose, any...:\Windows\system32\drivers\etc\HOSTS" is denied. BTW: when using anonymous user, no such errors. thanks in advance!

  • I am currently on a project where I have been asked to clean up the Site Template gallery from various collections across the organization. One of the offending web apps has one site collection... a complete inventory of sites and the template it uses without much code. Would love to do this from the UI. This can give an idea of sites we can safely delete. 2.) I am under assumption that we can delete the stp as required and current sites based off the deleted template will still be intact? I just don't want current sites to be impacted. 3.) Lastly, Outside as deploying templates

  • I try to create a new list in SharePoint 2010 with AddGallery.aspx and the Silverlight app gives me An unhandled exception occurred in the Silverlight Application right when I click the "Create" button. Here is some additional info: Same error across all sites Same error with all types of lists Same error with IE8, Chrome and FireFox Creating the list with SharePoint Designer works fine I have tried recycling the application pool It's a fresh Install; there are no custom solutions deployed I have no idea what could be the source of the problem.