Extraneous Properties?

Topics: Logging Application Block, Policy Injection Application Block
Apr 13, 2007 at 1:31 PM
When you add a Logging Handler to the PIAB what do the following Attributes do?

Categories
EventId
IncludeCallStack
IncludeCallTime
IncludeParameterValues
Priority
Severity

These all seem self explanitory but they seem to be overriden by the Listener that is configured in the Logging Application Block...And to that end What does the TraceOutputOptions Attribute do for a TraceListener?

Thanks,
Justin
Apr 13, 2007 at 4:29 PM
Hi Justin -

The Categories, EventId, Priority and Severity are standard properties in the LogEntry class. When you call the Logging block programmatically you specify the values for these in code, but since you don't write this kind of code with the PIAB you need to specify these values in the configruation (or attributes).

The IncludeCallStack, IncludeCallTime and IncludeParameterValues options specify whether additional information should be logged with the message. This info can be useful (especially for debugging) but will impact performance. These properties are not in the base LogEntry class, but they are in the derived TraceLogEntry used by the handler. In order to see the additional information you should modify the Text Formatter template using the {property(propname)} token. The PIAB QuickStart demonstrates this.

HTH
Tom