[Win32utils-devel] Plans for eventlog and service - feedback wanted

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Sun Oct 17 20:59:14 EDT 2004


Hi all,

I've almost got win32-eventlog 0.3.0 ready to go.  There are some minor 
tweaks to the API, but everything is still backwards compatable.  But, what 
I really want to discuss is setting up a default event source for Ruby.

Here's what I'm thinking - offer the option of installing a "RubyMsg" event 
source when you install win32-eventlog.  The name choice is based on the 
"PerlMsg" event source that ActiveState apparently installs.  Or, we could 
automatically install it when folks install win32-eventlog without prompting 
(just have it noted in the docs, as A.S. does).

Then, in win32-service we could automatically send stdout, stderr and 
warnings to the RubyMsg log.  Presumably, we could just check for the keys 
existence.  Otherwise, we could just instruct folks that they should 
redirect stdout, etc, on their own.

Here is the .mc file I had in mind:

MessageId=0x1
SymbolicName=CATEGORY_ERROR
Language=English
Error
.

MessageId=0x2
SymbolicName=CATEGORY_WARNING
Language=English
Warning
.

MessageId=0x3
SymbolicName=CATEGORY_OUTPUT
Language=English
Output
.

MessageId=0x4
SymbolicName=RUBY_ERROR
Language=English
Ruby error: %1
.

MessageId=0x5
SymbolicName=RUBY_WARNING
Language=English
Ruby warning: %1
.

MessageId=0x5
SymbolicName=RUBY_OUTPUT
Language=English
Ruby output: %1
.

We could also reduce this to just STDOUT and STDERR, but I thought folks 
might want to categorize warnings separately.  Also, we could add the 
following constants to EventLog:

CATEGORY_ERROR
CATEGORY_WARNING
CATEGORY_OUTPUT

RUBY_ERROR
RUBY_WARNING
RUBY_OUTPUT

A bit more readable than 0x01, etc.

So, what do folks think?  Feedback wanted.

Regards,

Dan




More information about the win32utils-devel mailing list