Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Enterprise Tools / March 2004

Tip: Looking for answers? Try searching our database.

Logging block, levels, & tracing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Carroll - 11 Mar 2004 15:53 GMT
Trying to get the logging application block working, mainly to use log
levels, am confused about tracing

The TraceCallEnter and TraceCallReturn classes have static methods called
Raise(). These methods do not have a parameter to set the
EventPublishLogLevel property.

In general, whether an event actually gets logged is supposed to be
determined by comparing the ApplicationLogLevel, specified in the config
file, to the EventPublishLogLevel for a particular event.

Is this mechanism not used for TraceCall events? Or is it used with a
default value for EventPublishLogLevel?

In my current setup, I'm getting TraceCall events logged to the Windows
Event Log even when I set ApplicationLogLevel to Error, which of course is
not what  I want.  And the LogLevel sample included with the block does not
give an example for TraceCall.

Thanks for any help.

Mike Carroll
Sigma Data Systems, Inc.
Mike Hayton [MS] - 11 Mar 2004 19:09 GMT
I dont know the answer to the question below. But I do know that there was
a separate thread about logging block questions where the team that
produced the logging block (a different one from EIF) said:

For any feedback to this please send to devfdbck@microsoft.com.  We
(patterns & practices [1] )developed these extensions to EIF and would like
to here any feedback or help in anyways we can.

The title of the thread was "Please read for info on Logging Application
Block (Extensions to EIF)" from Scott Densmore (scottden@microsoft.com).

I suggest that you email them directly and tell them your opinion/question.
Perhaps you could post their reply?
Maybe you might like to suggest that they check this newsgroup and reply to
the logging block questions directly?
Possibly there's someone else out there in the community who knows the
answer to this?

Sorry I couldnt be of more help

Mike
--------------------
| Trying to get the logging application block working, mainly to use log
| levels, am confused about tracing
[quoted text clipped - 19 lines]
| Mike Carroll
| Sigma Data Systems, Inc.

Signature

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Mike Carroll - 11 Mar 2004 19:19 GMT
Hi Mike,

After I posted, I saw your earlier e-mail, and sent a copy of my post to
devfdbck@microsoft.com. Haven't heard from them just yet.

Mike Carroll
Sigma Data Systems, Inc.
Tim Pfeiffer - 12 Mar 2004 15:54 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.