Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2007

Tip: Looking for answers? Try searching our database.

FileLogTraceListener not writing to file beyond a constant max-size

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kunal - 12 Jan 2007 18:05 GMT
Hi Friends,

I've been using FileLogTraceListener class to write log data to files.
Since the data being written is continuously generated, I set the file
to be created on a daily basis. I do not set up the maximum size for
the log file.

The problem is - My log files do not seem to grow beyond a fixed size
(4833 K). All messages are written to log file till the file grows to
this size and then no logs are appended. Here are my settings -

faultLoglistener = new FileLogTraceListener();
faultLoglistener.Location = LogFileLocation.Custom;
faultLoglistener.CustomLocation = "C:\\";
faultLoglistener.BaseFileName = "FaultLog";
faultLoglistener.LogFileCreationSchedule =
LogFileCreationScheduleOption.Daily;
faultLoglistener.Append = true;
faultLoglistener.Delimiter = "|";
faultLoglistener.AutoFlush = true;

Can I set the max-size to something (say 4000 K) and use the
"FullLogFileName" property to include a timestamp in the filename so
that when a file reaches its limit, another file with same name, date
and different timestamp is created and logging continued in that ?

If not, can somebody suggest how can I get over this problem so that I
continue to log messages ?

Thanks n Regards,

Kunal
Kunal - 12 Jan 2007 18:29 GMT
Oh Ok !

4833 K is the default max-size...since I was not setting this property,
the  default was in play.

But my log files can grow up to 30 Mb in a day. And manageability could
be a problem.

How can I play around with my listener to:

- create a new file each day

- create multiple files each day, each of the same manageable size (say
5 Mb)

Thanks,

Kunal

> Hi Friends,
>
[quoted text clipped - 28 lines]
>
> Kunal

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.