User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 374,007 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,904 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 693 | Replies: 8 | Solved
Reply
Join Date: Sep 2007
Location: Budapest
Posts: 251
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 12
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Help log4net issues

  #1  
Jan 15th, 2008
hello guys...

long time not to involve to c#/asp.net so i dont remember so many things.

i have problems to adapt log4net to my website to log all the activities.. i checked and tried out so many things but nothing works. i have sample web application from its producer but it doesnot work too(written in vs2003, after converting vs2005 gives messages like object not found etc. etc.

does anyone have ideas about that?

thanx in advance,

Miller
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2007
Location: Birmingham
Posts: 368
Reputation: Fungus1487 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 35
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Whiz

Re: log4net issues

  #2  
Jan 15th, 2008
can you put some error listing up here ?
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 251
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 12
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: log4net issues

  #3  
Jan 16th, 2008
the problem is i got this



Line 7:
Line 8:
Line 9: <log4net debug="false">
Line 10: <appender name="LogFileAppender" type="log4net.Appender.FileAppender" >
Line 11: <file value="webapp-log.txt" />




the code on those lines:


<log4net debug="false">
<appender name="LogFileAppender" type="log4net.Appender.FileAppender" >
<file value="webapp-log.txt" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
</layout>
</appender>
<appender name="HttpTraceAppender" type="log4net.Appender.AspNetTraceAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
</layout>
</appender>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="log-data\rolling-log.txt" />
<appendToFile value="true" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="5MB" />
<rollingStyle value="Size" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="LogFileAppender" />
<appender-ref ref="HttpTraceAppender" />
<!-- <appender-ref ref="RollingLogFileAppender" /> -->
</root>
</log4net>
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 251
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 12
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: log4net issues

  #4  
Jan 16th, 2008
i made it.. no problem anymore...
Reply With Quote  
Join Date: Apr 2007
Location: Birmingham
Posts: 368
Reputation: Fungus1487 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 35
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Whiz

Re: log4net issues

  #5  
Jan 17th, 2008
what was the issue? may help others if they ever get stuck with similiar problem
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 251
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 12
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: log4net issues

  #6  
Jan 17th, 2008
if u r familiar with .net, u know the common conversion issues from 2003 to 2005 or 2008. i ll post it here soon... which work with simple log file and sqlserver.
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 251
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 12
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Solution Re: log4net issues

  #7  
Jan 17th, 2008
Here is my solution.
requires .net 2005, .net framework 2.0 and sql server 2005
Attached Files
File Type: zip ActivityLogs.zip (291.2 KB, 1 views)
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 251
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 12
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Solution Re: log4net issues

  #8  
Jan 17th, 2008
new version
Attached Files
File Type: zip ActivityLogs.zip (319.0 KB, 4 views)
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 251
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 12
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: log4net issues

  #9  
Jan 17th, 2008
This is the output works as one class file, but a bit slow on database logging.
2008-01-17 17:32:51 INFO MSDOM\809133 ActivityLogs._Default ActivityLogs._Default.mAdd_Click(C:\Users\809133.MSDOM\Documents\Visual Studio 2005\Projects\ActivityLogs\ActivityLogs\Default.aspx.cs:27) Did Something
2008-01-17 17:34:04 INFO MSDOM\809133 ActivityLogs._Default ActivityLogs._Default.mAdd_Click(C:\Users\809133.MSDOM\Documents\Visual Studio 2005\Projects\ActivityLogs\ActivityLogs\Default.aspx.cs:27) Did Something
Last edited by fatihpiristine : Jan 17th, 2008 at 12:03 pm.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 10:40 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC