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

satmisha
satmisha used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
request to please suggest ..?
Senior Developer
Commented:
The EntLib Logging block can do this as also can Log4net.

Author

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 ?
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

ste5anSenior Developer

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

Open in new window

Author

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?

Author

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.

Author

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..?

Author

Commented:
Thanks Stfan

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial