I think I just worked through this same problem. The problem seems to
be that the LogLevelSample (and possibly others) is configured to use
sink classes in Microsoft.EnterpriseInstrumentation, which has no
awareness of the log level settings. I assume it writes them (and any
other event properties) out via reflection, which might suggest it
understands their intended use, but that's apparently not the case.
It seems simple enough to fix. In the EnterpriseInstrumentation.config
file, find the element that defines your logSink. Going from the
default config with the sample, that means changing this:
<eventSink name="logSink" description="Outputs events to the Windows
Event Log." type="Microsoft.EnterpriseInstrumentation.EventSinks.LogEventSink">
to this:
<eventSink name="logSink" description="Outputs events to the Windows
Event Log." type="Microsoft.ApplicationBlocks.Logging.EventSinks.LogEventSink,
Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=89bbb04ec7b04775">
I hope this helps.
Mike Carroll - 12 Mar 2004 22:31 GMT
Hi Tim,
Yes, that's exactly what it was. I sent my EnterpriseInstrumentation.config
file to 'devfdbck@microsoft.com',
and Naveen Yajaman wrote back and identified the problem.
It looks to me like the EI.config files that ship with the LogLevelSample
correctly references
Microsoft.ApplicationBlocks.Logging.EventSinks.LogEventSink, so I'm a little
puzzled as to how you and I both wound up with the same problem, but I'm not
going to worry about that.
One related note for anybody else who's reading, watch out for the
"PublicKeyToken" attribute in the EventSink element, you can't just copy
that from somebody else's EI.config file.
I'm not entirely out of the woods yet. Right now I'm back to not getting
anything logged, instead of getting too much. But I think I'm making
progress.
Mike Carroll
Sigma Data Systems, Inc.