eventlog.writeentry method

  • Thread starter Thread starter Colin Halliday
  • Start date Start date
C

Colin Halliday

A number of the overloaded forms of the eventlog.writeentry method allow for
an event log entry CATEGORY (a short).

The help for this method states:

'Each application can define its own numbered categories and the text
strings to which they map.'

How do I define the text strings and map them to the numeric category
numbers?

Many thanks.
 
Hi,

the category number is an application defined variable, so that you may
choose category 1 for Accounting Apps, category 2 for Billing and so on. In
the log, you can filter the events using the log. It is more an extended
facility to categorize the event log according to your needs.

HTH
Regards
Joyjit
 
Yes, but I want the category text to display in the event log, not the
number. When I look at the Application event log, for example, some events
have text displayed in the category while others have numbers.

In my .Net project I can only pass a numeric (short) for the category in the
eventlog.writeentry method. How do I get a text category to appear in the
event log rather than this number??

Colin Halliday
 
Hi Colin,

If you want your custom logs to be filtered this way, why don't you write
custom logic to change the create & change the EventSource property to
create a different source according to your category.

Regards
Joyjit
 
I think we are talking about different aspects of event logs. I don't want
to filter anything at this stage, just create entries in an event log.

Colin
 
Back
Top