FileLogTraceListener & TraceInformation

  • Thread starter Thread starter syl
  • Start date Start date
S

syl

Hello

I am building a web service, and i would like to trace information with
System.Diagnostics.Trace.TraceInformation.

I think that i have properly configure the web.config file, but I have no
trace! it doesnt work...

Here is my config :
<system.diagnostics>

<sources>
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
</listeners>
</source>
</sources>

<switches>
<add name="DefaultSwitch" value="Information" />
</switches>

<trace autoflush="true" indentsize="2">
<listeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
traceOutputOptions="ThreadId, DateTime" Location="ExecutableDirectory" />
</listeners>
</trace>

<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"/>
</sharedListeners>

</system.diagnostics>

Is there some mistakes?



Thanks!

Sylvain
 
Looks correct to me, first are you defining TRACE in your current config, and
second, how are you attempting to write to the trace file?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top