Why doesn't trace write timestamp?



I have this in an app.config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<trace autoflush="true" indentsize="2">
<listeners>
<add name="myListener" traceOutputOptions="Timestamp"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="C:\TestConsole\MyListener.log"/>
</listeners>
</trace>
</system.diagnostics>
</configuration>

The code I'm using to write is this:

Debug.WriteLine("Hello config file.");

I just want to output variable values but also would like a time stamp
appended with every .Write or .WriteLine. First, what is the above
timestamp option doing (this came from intellisense) and how do I get
the behavior I'm looking for?

Thanks,
Brett

.



Relevant Pages

  • Re: Make my horn not quite so bright sounding ?
    ... he or she has put on the trumpet when the trumpet is handed to the ... need to be a third person involved in changing the configuration so that the ... demonstrates that some listeners are considerably more "expert" than average ... Hmm, that reminds me, Moore successfully demonstrated some of the impacts of ...
    (rec.music.makers.trumpet)
  • Re: The configuration section for Logging cannot be found in the c
    ... formatter="Default Formatter" ... "The configuration section for Logging cannot be found in the ... What is the meaning of "configuration source"? ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Enterprise Library 2.0 configuration error
    ... Was the Enterprise Library 2.0 assemblies copied to the output directory? ... created the app.config file with the 'Enterprise Libray Configuration' ... The configuration section for Logging ...
    (microsoft.public.dotnet.framework)
  • Enterprise Library 2.0 configuration error
    ... created the app.config file with the 'Enterprise Libray Configuration' ... When I execute the solution within Visual Studio 2005, ... The configuration section for Logging ...
    (microsoft.public.dotnet.framework)
  • RE: Problem with loading app.config
    ... "DoB" wrote: ... I was trying to configure the Trace class using the app.config. ... configuration. ... removed it and added some other listeners in a config file. ...
    (microsoft.public.dotnet.languages.csharp)