What is it?

An interface to the Windows Event Log.

Prerequisites

Ruby 1.8.2 or later. windows-pr 0.5.0 or later.

Installation

Manual install

ruby testtc_eventlog.rb (optional) ruby install.rb

Gem Install

ruby win32-eventlog.gemspec gem install win32-eventlog-X.Y.Z-mswin32.gem

This will install both the win32-eventlog and win32-mc packages. The latter is strictly for turning .mc files into .dll files. See the mc documentation for more details.

Installing the ‘RubyMsg’ event source

If you wish to install the RubyMsg event source, run the ‘install_msg.rb’ script in the ‘misc’ directory. This will create a ‘rubymsg’ directory under your toplevel Ruby installation directory (usually C:ruby), and create the .dll, .h, .rc and .res files there, in addition to copying the rubymsg.mc file. It will then install the ‘RubyMsg’ event source into your registry.

DO NOT MOVE THE DLL FILE ONCE IT IS INSTALLED! If you do, you will have to delete the registry entry and reinstall it with the correct path.

Take a look at the rubymsg.mc file for the category and message values. If you do not understand this, please read the ‘tutorial.txt’ file in the ‘doc’ directory.

Additional documentation

If you are unfamiliar with message files and event logging on Windows in general, please read the ‘tutorial.txt’ file.

There are also a couple of sample test scripts under the ‘examples’ directory if you want to futz around and get a feel for how things work.

If the tc_mc.rb tests fail

There’s a chance that you either don’t have the mc, rc and/or link commands installed or they’re not in your %PATH%. If you have MSVC++, you should have them somewhere on your system.

Known Issues

The code currently only checks the EventMessage file, it does not check the CategoryMessage or ParameterMessage files.

License

Ruby’s

Warranty

This package is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.

Authors

Daniel J. Berger Park Heesob