Hi all,
I’m happy to announce the first release of win32-eventlog. This is a
Ruby interface to the Win32 EventLog.
Synopsis
···
========
require "win32/eventlog"
include Win32
handle = EventLog.open(“Application”)
handle.total_records # e.g. 916
handle.oldest_record_number # e.g. 1
Read through every entry, inspecting each struct in turn
handle.read{ |elr|
p elr
puts
}
Backup the Application log
handle.backup(“C:\Backups\Application.bak”)
Clear the Application log, after backing it up
handle.clear(“C:\Backups\Application.old”)
handle.close
There’s no write ability at the moment, but I should have that in the
next release. See the “Future Plans” section of the documentation for
more details.
Feedback welcome. Enjoy!
Regards,
Dan