setting up database sink on Logging Application Block

Topics: Logging Application Block
Jul 17, 2007 at 8:10 AM
hi,

i was trying out the Logging Application Block and i got most of the trace listener (sinks) running. but i encounter an error on the database sink:

Invalid TraceListenerData type in configuration 'listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Database.Configuration.FormattedDatabaseTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null"'.

i have already configured the database sink but i still get the error, can anyone provide me with some insights?

Thanks
Jul 17, 2007 at 11:35 AM
Hi,

This could be caused by either not deploying the logging.database assembly (it won't be copied while building if, as it should be, it is not referenced by your projects), or you're deploying a wrong version (the configuration file is describing the type from the unsingned assembly). The former is more likely.

Hope this helps,
Fernando
Aug 16, 2007 at 7:19 AM
hi,

my apologies for failing to respond promptly... i got this figured out already, thanks.
i had not notice initially that the logging application block's database sink has its own library to handle db logging. also just to be on the safe side... i have taken to adding the data access application block in conjunction w/ the logging application block's database sinks.

may i confirm whether this is really necessary? that if i were to use the database sink on the logging application block's config...i also would be needing to references DAB's libraries...

Thanks again...
Aug 16, 2007 at 11:34 AM
Hi,

Your application only needs to reference the "main" assemblies for the blocks it uses, as well as the Common and ObjectBuilder assemblies. However, all the assemblies it needs to work at runtime need to be deployed with the application. Which assemblies are needed is largely determined by configuration; e.g. if you use the logging block you need to reference the logging block's main assembly, but since you're using the db trace listener you need to deploy this listener's assembly as well as the DAAB assembly it depends on.

So, you do need to deploy the DAAB assembly but you don't need to reference it in your project.

Regards,
Fernando
Sep 25, 2007 at 3:46 PM
Well,

I have a problem that DatabaseTraceListener and EmailTraceListener don't wotk at all. No error, no exception, it's just that nothing happens!
FlatFileTraceListener works though.
Are former two listeners implemented at all, or is EL2 buggy?
Sep 25, 2007 at 5:01 PM
Hi,


nospam wrote:
Well,

I have a problem that DatabaseTraceListener and EmailTraceListener don't wotk at all. No error, no exception, it's just that nothing happens!
FlatFileTraceListener works though.
Are former two listeners implemented at all, or is EL2 buggy?


They certainly work; you can browse and execute the unit tests for more details.

Fernando