Ever wonder how to add entries to the Portal Log?  Well, you can do this the easy way by using Microsoft.Office.Server.Diagnostics.PortalLog.LogString but there always seems to be those cases where you want more flexibility than just adding a basic message to the logfile.  For example, you may want to flag things as Information or maybe change the application name for your entries to make it easier to search for them in the log file...

I came across an great example of doing just that, see the link below.

SharePoint Logging and Microsoft’s Trace Log Provider at trentacular