Question about semantic logging

Topics: Semantic Logging Application Block
Mar 28, 2014 at 4:27 PM
Edited Mar 28, 2014 at 5:34 PM
1> In out-of-Process approach, the EventSource logs the messages directly into ETW. In this approach we don't use listener so during writing messages into ETW how do we filter the messages by EvelLevel & Ketwords? I understand that consuming service can filter messages while reading from ETW but i would like to filter while writing into ETW. is it possible?

2>In In-Process approach, does the message get intercepted by listener, so it never reaches to ETW?

3>What is the location of ETW tarces?
Mar 31, 2014 at 8:05 AM
ETW will check to see if any sessions are open and also if the there are any listeners which are enabled for the event metadata (including EventLevel and Keywords). So you shouldn't have to do anything for this to work. You could use the IsEnabled(EventLevel, Keywords) method to check if the event is enabled to improve performance.

For the in-process approach, events are first sent to ETW and then to in-process listeners so using in-process listeners does not preclude out-of-process ETW events being captured.

What is the location of ETW tarces?

ETW trace data is written to wherever the listeners are configured (e.g. file). Or do you mean how does ETW manage the trace data? Internally ETW uses per-processor in-memory buffers to store events.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Mar 31, 2014 at 3:47 PM
Edited Mar 31, 2014 at 3:47 PM
For the in-process approach, events are first sent to ETW and then to in-process listeners so using in-process listeners does not preclude out-of-process ETW events being captured.
Does that mean whether i use in-process or -out-of-process, the messages are always getting written into ETW ( assuming IsEnabled returns true)??