TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Neelam Chandra
NA
1
4.1k
How to stop log4net from creating two log files
Jun 30 2014 10:01 AM
Hello,
I am using below code in my web.config and I found there are two log files getting created .
For some reason every day the logger switches at times to an alternate log file with the filename (which is supposed to be yyyy-mm-dd.log.text) repeated twice. So there are always two log files.
Please guide me if I am missing something or making any mistake.
<log4net debug="true">
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="C:\\AllLogs\\projectname\\" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<DatePattern value="yyyy-MM-dd'.log.txt'"/>
<!--<maxSizeRollBackups value="10" />
<maximumFileSize value="500MB" />-->
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %type{1}.%method - %message%newline" />
</layout>
</appender>
<root>
<level value="INFO" />
<appender-ref ref="RollingLogFileAppender" />
</root>
</log4net>
Thanks,
Reply
Answers (
1
)
Javascript Button click Issue
How to implement Search Funtionality in MVC4?