Database trace listener - extending

Topics: Building and extending application blocks, Logging Application Block
Mar 31, 2007 at 2:04 AM
I am trying to extend / create my own database trace listener. I thought I had one working but I think I was stepping through the Ent Library source by mistake.

Ideally I would like my own Listenerdata type so that I can specify the name of an additional Sproc I would like to call during the logging process.

I created all my classes and then hit a road block with needing something to do with a configuration node or something - forget the error.

Can somebody provide a clear example if this is possible.
Mar 31, 2007 at 2:14 AM
The best example is the existing Database Trace Listener. It is completely separate from the main Logging Application Block assemblies, so it demonstrates how to build your own Teace Listener without needing to modify the existing code.

The configuration node is a design-time concept, so this code is included in the ...Logging.Database.Configuration.Design project.

Mar 31, 2007 at 2:38 AM
Edited Mar 31, 2007 at 2:50 AM
Thanks for the fast reply?

Follow up - So everything I need to do can be done outside of the core library?

At the end will I have support in the configuration tool?
Mar 31, 2007 at 11:55 PM
Yes :-)
Apr 3, 2007 at 4:55 PM
Should we used Application Block Software Factory to create a new tracelistner? If yes, do you have any tutorial or sample project for the same?

This is what i read about Provider Library.
- Provider Library: It contains only implementations of an existent Application Block. It must reference the Application Block project (or assembly) and it should only implement new Providers. It is a mechanism to extend existent Application Blocks without modifying them.
Apr 3, 2007 at 5:29 PM
The ABSF is often the path of least resistance to creating new providers, however it doesn't do anything that you couldn't do yourself the old fashioned way. If an existing provider implementation is already very close to what you want (which seems to be the case for iandtm) then it will probably be better to copy and modify the existing code rather than using the factory.

The Provider Library is a solution template that sets up the key projects and references for building your own providers that are separate to the core block, so it's an appropriate starting point if you decide to use the factory. Unfortunately we don't have any tutorials beyond what's in the documentation (although the final release has more complete docs), but I'd like to put together some video tutorials on this and related concepts after the release.

Apr 3, 2007 at 5:56 PM
Edited Apr 3, 2007 at 6:01 PM
Thanks for a quick response. I would be waiting for the tutorials. By that time, if you have any resourses on ABSF can you please forward it to me