Shawn Scott wrote:
> Hello,
>  
> I am working on a Perl script to collect and parse Event logs using 
> Win32::EventLog. When the script parses the Category instead of the text 
> I see a number. Is there something else that must be done to the 
> Category entry to display the text of the category instead of a number? 
> All other entries are correct.

 From this description, I doubt it:

wCategory
        Specifies the event category. This is source-specific information;
        the category can have any value.

EventCategory
        Specifies a subcategory for this event. This subcategory is source
        specific.

I would just display the number in ASCII or hex ASCII (you may need to
convert from binary).

If it's the error type, you could make a hash with these defines
and do a lookup to convert the type:

#define EVENTLOG_ERROR_TYPE             0x0001
#define EVENTLOG_WARNING_TYPE           0x0002
#define EVENTLOG_INFORMATION_TYPE       0x0004
#define EVENTLOG_AUDIT_SUCCESS          0x0008
#define EVENTLOG_AUDIT_FAILURE          0x0010
_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to