Spamming the event log when iirf.ini is missing

Topics: User Forum
Feb 19, 2011 at 2:48 AM

Running v2.1 on IIS6, installed using the msi.

I have a site with a number of applications (virtual directories) in sub directories. The iirf.ini is configured and working correctly in the root of the site.

Each request to one of the sub applications generates a warning in the application event log that the iirf.ini file in the virtual directory does not exist. (event ID 3, IIRF: Could not open ini file)

Is there a way to stop logging this event? It is impractical for me to add an iirf.ini to every application.

Feb 20, 2011 at 3:51 PM
Edited Feb 20, 2011 at 3:57 PM

Yes, I agree, IIRF shouldn't spam th event log.  How about if, for each vdir, when the IIRF.ini is missing, IIRF spools one event per process, and then stops complaining? You'll get a new event every time you restart IIRF or IIS, for each vdir with no IIRF.ini.

Feb 20, 2011 at 3:52 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Feb 20, 2011 at 3:54 PM

Hmmm, or are you asking for something different?

Are you saying, you don't want any events at all, for missing IIRF.ini files?

I suppose that would be good for an IIS deployment with, say, hundreds of vdirs or sub-applications, and only a few of them have an IIRF.ini present. In that case you'd like to turn off event logging completely, for the case of a missing IIRF.ini file.

Is that what you're after?



Feb 21, 2011 at 1:40 AM

Both options would be good. When initially configuring iirf it would be good to know if the file is missing, but afterwards you would want to turn the warning off.

Feb 22, 2011 at 2:42 PM

ok, here's what I'll do:

Enable a new directive in the IirfGlobal.ini, it looks like this:

# Turn off windows event logging for vdirs that lack ini files
EmitEventsForMissingIni OFF

This tells IIRF to not log a system event when an ini file is missing. This will occur when there is a vdir that has no IIRF.ini file.  As you saw, the current behavior of IIRF is to log an event  in the Windows application event log when this happens. This directive disables that behavior.

The reason IIRF used the event log in this condition, is that lacking an ini file for a vdir, there is no IIRF logfile for that vdir, so it's not possible to log a message in the IIRF logfile.  Therefore, I chose to log a message in the event log. But using the event log this way was not well thought-out.  Lots of people install IIRF for use on a subset of vdirs in IIS.  This common case would result in lots of events in the Windows event log.

The new directive will turn off that event logging.

I won't make it the default behavior; in other words you will by default still get Windows Event log spam.  The reason is, I want people to be aware that the vdir ini file is missing.

I've made those changes and they work.

Now, supposing the new directive is not present in IirfGlobal.ini.... Above I proposed to modify IIRF to spool only ONE event to the Windows Event Log per vdir, per lifetime of IIRF.  I'm still working on that.    That shouldn't be hard to do.  I'll keep you updated.

This will be available in v2.1.1.26 of IIRF (not yet released).



Feb 22, 2011 at 11:03 PM

Sounds good. Thank you.

Feb 23, 2011 at 3:39 AM

ok, there's an MSI on that workitem, containing an interim build of IIRF, with this change in it.  You can try it out if you like.