Tom Jones
Tom Jones

Reputation: 275

Enterprise Library 5 Logging to database contention

I am looking to capture WCF request/response information through using the Enterprise Library logging block and writing the captured information to a database table. My one concern is that this could become a source of contention with many different WCF services attempting to log to this one table.

Does Enterprise Library Logging handle the issue with contentions in this case or do I need to actually use something like MSMQ and use MSMQ to write logs to the database?

Upvotes: 0

Views: 191

Answers (1)

Rob Allen
Rob Allen

Reputation: 2921

If you download the source for enterprise library you can look through all of the classes you are using.

That said, the logger class will only write one message at a time using a lock. If you are writing tons of messages and performance is a concern then you might want to read up on the AutoFlush setting and cache up your messages and perhaps write on a different thread or something.

Upvotes: 2

Related Questions