Try our conversational search powered by Generative AI!

Using log4net

Vote:
 

Hi,

How can i create a loging in Episerver site using log4net .How can i save the details of pages visited by user .

Best Regards

SADIK R 

 

 

#25919
Nov 12, 2008 11:02
Vote:
 

Hi there,

If you want to do application logging log4net is a great. However if you need statistics logging, you should look at Google Analytics or some sort of IIS logparser. 

 

Good luck!

#25923
Nov 12, 2008 13:07
Vote:
 

Hi,

I will explain my intention.If the user needs to access the site he needs to log in to the site.For this i need to use log4net.How can i use the log4net for this task.Is there any documentation or some samples related with this.Once a user logs in i need to save the pages that he is visiting.IS there any episerver bulid in functinality to acheive this.or I need to create tables and store the details of the pages the logged in user is visiting.Please advice

Best Regards

SADIK

#25925
Nov 12, 2008 13:51
Vote:
 

Hi!

Just an idé!

You can build a HttpModule. Register a proper event on the Init method. Some event after the AuthenticateRequest and AuthorizeRequest. If the user is known log the request.

/Hans

#25931
Nov 12, 2008 20:37
Vote:
 

Sadik, i'm not sure if it is what you are looking for, but EPiServer has a built in statistics tool:
http://world.episerver.com/en/Articles/Items/Did-you-know-that-there-is-a-built-in-statistics-function-in-Edit-mode/
http://world.episerver.com/en/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-5-SP1/Log-Service-Installation-Instructions/

If that is not what you are looking for, you will need to create your own version :) EPiServer uses log4net for logging, so it shouldn't be that difficult. Check out the EPiServerLog.config file. You can create a new custom database, a new db appender for log4net, and use that to log whatever you need. 

--
Lars Øyvind Bodahl
www.epinova.no 

#25933
Edited, Nov 13, 2008 7:46
Vote:
 

Hi,

Is there any sample code how to create a logging using log4net in Episerver CMS SP2?

Best Regards

SADIK

#25936
Edited, Nov 13, 2008 8:29
Vote:
 
http://world.episerver.com/en/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-SP2/Logging-in-EPiServer-CMS-5/
#25960
Nov 13, 2008 20:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.