1. Create a project (It seems .net 4 doesn't work well with SharePoint 2007)
2. Add the reference to Microsoft.Office.Server.dll. (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI)
3. The log code looks like this.
try
{
throw new Exception("This is a test");
}
catch (Exception ex)
{
Microsoft.Office.Server.Diagnostics.PortalLog.LogString(ex.Message, null);
}
Done
7e638283-c480-4930-89f2-078be56405d3|0|.0
Sharepoint
SharePoint,