Fusion Log Viewer Settings Changer

The Fusion Log Viewer (in pre-.NET-2.0) is a great tool but is a pain to work with if you're working with ASP.NET apps. The built-in ASP.NET log setting is useless, which means if you're going to debug ASP.NET, you need to use the Custom setting. MSDN talks about how to do this, but I find I do one of two things, always:

  1. Enable logging in a custom folder (sometimes logging everything, sometimes logging only failures
  2. Disable logging to the custom folder (and, in most, if not all cases, logging of binding in general, including failures)


To that end, I wrote a little script to handle that. From the command line (available by running the script with a "/?" parameter):
FusLogVwSet
This script "enables" and "disables" custom settings for the Fusion Log Viewer tool.

Enabling settings will:
  • Create a log folder (default: C:\fusionlogs)
  • Add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogPath and set it to the log folder
  • Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogFailures to 1
  • Optionally set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\ForceLog to 1
  • Optionally set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogResourceBinds to 1

Disabling settings will:
  • Delete the log folder and its contents
  • Delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogPath
  • Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogFailures to 0
  • Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\ForceLog to 0
  • Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogResourceBinds to 0

Usage: FusLogVwSet.wsf [/enable] [/all] [/disable] [/logpath:value]

Options:

enable : Enable custom fuslogvw.exe settings.
all : When used with /enable, logs both failures and successes. Only valid with /enable.
disable : Disable custom fuslogvw.exe settings.
logpath : Sets the log path (default is C:\fusionlogs). Only valid with /enable.

If you use the Fusion Log Viewer to debug your .NET assembly bindings, this is pretty handy stuff.

Note that since it writes to your registry, you need rights to do that. It'll fail if it can't write the appropriate keys.

[Download FusLogVwSet.wsf] (right-click, save-as... then rename the txt file to ".wsf")

(Of course, no warranty, expressed nor implied... use at your own risk, etc.)

posted on Wednesday, October 20, 2004 12:35 PM | Filed Under [ Software / Downloads Release Notices .NET ]

Comments

Gravatar # Re: Fusion Log Viewer Settings Changer
by Factory44Development at 1/11/2007 4:10 PM
Hey Travis. Thanks for your great script. I just ported it to C#: http://factory44development.com/typo/articles/2007/01/11/scripting-the-fusion-logger

Peace,
- Andrew Janssen
Gravatar # ComputerZen.com - Scott Hanselman's Weblog - Scott Hanselman's 2005 Ultimate Developer and Power Users Tool List
by www.hanselman.com at 6/19/2005 9:54 PM
Gravatar # Scott Hanselman's Computer Zen - Scott Hanselman's 2006 Ultimate Developer and Power Users Tool List for Windows
by www.hanselman.com at 8/29/2006 1:43 AM
Gravatar # Scripting the Fusion Logger
by factory44development.com at 1/11/2007 4:03 PM
Gravatar # re: Fusion Log Viewer Settings Changer
by Dorset Software at 11/16/2008 7:00 AM
Thank you.
Comments have been closed on this topic.