Re: Tracing to text file in production environment (debug="false")
Efran Cobisi <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Organization | QBGROUP SpA |
| Message-ID | <[email protected]> |
Hi Ben, I need to know a bit more about your implementation... Is your trace.axd showing the issued traces? Did you add the custom listener to the Trace.Listeners collection? Did you flush trace streams (using Trace.Flush or Trace.AutoFlush) as needed? HTH, Efran Cobisi http://www.cobisi.com Ben Joyce wrote: > Hi Efran. > > Thanks for your response. After modifying my web.config as you > suggest and running the application with debug="false" it appars my > Trace.Write commands are being ignored as the customer listener I have > setup (dumps to a text file) has not been firing. > > Any ideas? > > Cheers, > > Ben > > On 1/22/07, Efran Cobisi <[email protected]> wrote: >> Hello Ben, >> >> The trace approach is the best to follow, in my opinion. To enable >> tracing in ASP.NET just use the following directive inside your >> web.config file (system.web section): >> >> <trace enabled="true" /> >> >> If you need to capture trace data in a custom trace listener, be sure to >> set the writeToDiagnosticsTrace attribute (1) of this element to true >> also. >> >> HTH, >> >> Efran Cobisi >> http://www.cobisi.com >> >> References: >> 1) >> http://msdn2.microsoft.com/en-us/library/system.web.configuration.tracesection.writetodiagnosticstrace.aspx >> >> >> >> Ben Joyce wrote: >> > When I deploy a site into production I set the debug flag to false in >> > the Compilation section of web.config. When I do this the debug.write >> > statements I have in my code are ignored so nothing gets written to >> > the text files listener I have set up. >> > >> > I've tried using trace.write instead so I can still get stuff >> > outputted to a file when the site is running, but my trace.write >> > statements also seem to be ignored. >> > >> > Is there some further configuration I have to do to enable this? >> > >> > Cheers, >> > >> > Ben >> > >> > =================================== >> > This list is hosted by DevelopMentor(r) http://www.develop.com >> > >> > View archives and manage your subscription(s) at >> > http://discuss.develop.com >> >> =================================== >> This list is hosted by DevelopMentor(r) http://www.develop.com >> >> View archives and manage your subscription(s) at >> http://discuss.develop.com >> > > =================================== > This list is hosted by DevelopMentor® http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com