N
ningjun.wang
I am new in ASP.net programing. I want to send all trace message to a
file as follow:
<system.diagnostics>
<trace autoflush="true">
<listeners>
<add name="TestTracer"
type="System.Diagnostics.TextWriterTraceListener, System,
Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
initializeData="<app root directory>\Asptesttrace.log" />
</listeners>
</trace>
</system.diagnostics>
The problem is that the file will grow infinitely in size. How can I
make the file rotate daily so that a new log file is created every day?
file as follow:
<system.diagnostics>
<trace autoflush="true">
<listeners>
<add name="TestTracer"
type="System.Diagnostics.TextWriterTraceListener, System,
Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
initializeData="<app root directory>\Asptesttrace.log" />
</listeners>
</trace>
</system.diagnostics>
The problem is that the file will grow infinitely in size. How can I
make the file rotate daily so that a new log file is created every day?