FileLogTraceListener not writing to file beyond a constant max-size

  • Thread starter Thread starter Kunal
  • Start date Start date
K

Kunal

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
 
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
 
Back
Top