Trace Class question
-
I am using Trace in order to log information about the behavior of a web application. In web.config I have defined my Application Listener as following: As you can see all activity is logged in "d:\temp\activity.log". Is there a way to make this variable, that is changing by date automatically, such as: activity20041201.log, activity20041202.log, activity20041203.log etc. Thank you for your time Spiros Prantalos Miami the place to be!!
-
I am using Trace in order to log information about the behavior of a web application. In web.config I have defined my Application Listener as following: As you can see all activity is logged in "d:\temp\activity.log". Is there a way to make this variable, that is changing by date automatically, such as: activity20041201.log, activity20041202.log, activity20041203.log etc. Thank you for your time Spiros Prantalos Miami the place to be!!
I dont think this is possible via the .config. But you could configure the tracing from your own code, e.g.: System.Diagnostics.Trace.Listeners.Add(new System.Diagnostics.TextWriterTraceListener("activity" + DateTime.Now.ToShortDateString() + ".log"));