Hybrid Logging in WCF application in file system as well as in database

Hi Experts, My requirement is to ensure hybrid logging in wcf application i.e. in file system as well as in db. Can you please suggest the best approach to go with ?

1. There should be parallel thread for logging in file system as well in the db.

Thanks in ton in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

satmishaAuthor Commented:
request to please suggest ..?
ste5anSenior DeveloperCommented:
The EntLib Logging block can do this as also can Log4net.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
satmishaAuthor Commented:
Thanks ste5an,  I am checking the EntLib but unable to find followings:

1. It helps to save the logging info in the database.
2. where it says that it could asynch/Parallel thread push the info to db.

M i missing something on this, can you please point out any link on above if possible ?
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

ste5anSenior DeveloperCommented:
It's in the .NET framawork, e.g.
Task.Factory.StartNew(() => LogMessage(message)); 

Open in new window

satmishaAuthor Commented:
Little confused:

Since I have to capture logging info in wcf on File system(limited info) and in database, so I have to use task parallel libraries to capture the logging information(input request, outgoing response)  and than push that to database whereas for file system Entprise lib will do for File system.

Means enterprise lib will not provide any mechanism to manage thread while pushing information to the database?
satmishaAuthor Commented:
I guess I got it, correct me if I am wrong in my understanding:

1. Enter Lib are nothing but MS commanded way to write log info.
2. It would help to write rolling log file for wcf.
3. .Net framework has ability to write log asynchronous for both file system as well as database, it has nothing to do with Enterp Lib.

Looking forward to hearing from you.
satmishaAuthor Commented:
Hi Expert
I need to do logging in file and in the database asynchronously. Can you please provide some link through which I can achieve the same..?
satmishaAuthor Commented:
Thanks Stfan
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.