Handy logging info..

I have an issue when it comes to debugging if a problem hits on the live environment. For some reason I cannot get the debugger to attach..

As a temporary solution, I made use of a technique pointed out by Clin Byrne on the SUGUK forums that makes use of the MICROSOFT.OFFICE.SERVER.DIAGNOSTICS namespace, and more importantly, the PortalLog object.

This method is VERY simple to use, all you need is a reference in your project to the Microsoft Office Server.dll.

Once thats in place, you can use the following at any point in your code to dump an entry into the latest log in the 12 Hive.

PortalLog.LogString("Any freeform text your like here")


Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.