Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,

I am using N-Tier architecture in my application.
That consists of MVC web application, proxy project, WCF service project, business layer project, data layer project.
I am logging the application activity through Log4Net framework.
Now logging is working for MVC Web application and in proxy alone.Remaining layers are not logged.
I am using seperate log file for logging and i registered assembly in all the layer except WCF.

I want to log activity that belongs to all the layer including WCF if possible.

Thanks and Regards,
RK
Posted
Comments
praks_1 17-Jul-13 1:09am    
Yes,It is possible u have to configure for all the project
♥…ЯҠ…♥ 17-Jul-13 1:13am    
I have placed log4net config file in all the projects and I pasted configuration settings on to the service web.config file.Is there anything I am missing at this point?

Hi,
see this link:
http://sadi02.wordpress.com/2008/06/29/log4net-tutorial-in-c-net-how-can-i-show-log-in-a-file/[^]

And u don't have to copy .xml file to all project u can do other way round also.
 
Share this answer
 
Comments
♥…ЯҠ…♥ 17-Jul-13 1:52am    
I want to log activities in all the layers, but above tutorial states only for single project i believe. Could you help me with multiple layered logging?
Hi Friends,

I solved this by creating separate project called log4netwrapper to log the application.
I designed a class to read the log4net config file then, i wrote a class for different debug levels.
Now I referenced the log4netwrapper dll to all the layer and I added configuration to service.
The only thing that bothers me is, upto service it is logged as one file and after service it is logged as another file.
Except this everything is perfect.

Thanks,
RK
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900