Is it possible to use LoggingService with a Database Trace Listener?

Topics: Logging Application Block, Silverlight Integration Pack
Jan 4, 2012 at 8:19 PM

I'm wondering if it's possible to direct log entries from a Siilverlight 4 client to a database trace listener?  I've searched all around (well, it feels like all around) without much luck.

The reason I am asking is when I try logging from the Silverlight client via the RemoteServiceTraceListener, nothing gets logged, at least not to the database.  If I direct the log category to the Event viewer, then it logs fine.  All log entries, server side and client side are logged as expected.  If I point back to the database listener, then all I get are the server side log entries.  So, I think I have the RemoteServiceTraceListener configured correctly since I get entries in the event viewer from the client.  I also believe I have the DatabaseTraceListener configured correctly since I can log to the database from server side code.  I'm obviously missing something in between, a swith or parameter or something, but no idea where to look to find out what that something is.

Is there any documentation, examples or samples for using the LoggingService with a Database Trace Listener out there? 

Any help or pointers are much appreciated.

Thanks.

Alex.

Jan 4, 2012 at 8:36 PM

If you are using Silverlight RemoteServiceTraceListener with the server side Database TraceListener there is an issue with NULLs being sent for the

  • MachineName
  • ProcessID
  • ProcessName

See this thread for more information and some workarounds.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com

Jan 5, 2012 at 3:27 PM

Yup.  That was what I was missing.  In fact, if I had thought (d'oh) to look at the event log where failed Logging attempts are recorded, I would have seen the nullability problem on those fields. 

Thank you very much for the quick response.  Saved me a lot more wasted time trying to track it down.