G
Guest
I've got a web service running, and i'm trying to build tracing into it that
is outputted to a file. Unfortunately, i can't find a way of enabling TRACE
token, and it just seems to skip over all System.Diagnostics.Trace lines in
the debugger.
I don't want to use the ASP page trace dump, as it will break my SOAP
interface.
This code is called on my application start event:
Dim lstrFileStream As System.IO.FileStream
Dim objTraceListener As System.Diagnostics.TraceListener
'Create Stream and Listener
lstrFileStream = New System.IO.FileStream("C:\Temp\Tracer.Log",
IO.FileMode.OpenOrCreate)
objTraceListener = New
System.Diagnostics.TextWriterTraceListener(lstrFileStream)
objTraceListener.TraceOutputOptions = Diagnostics.TraceOptions.Timestamp
'Trace Item
System.Diagnostics.Trace.Listeners.Add(objTraceListener)
This is called at the start of one of the SOAP requests:
System.Diagnostics.Trace.Write("Add Account Called.")
System.Diagnostics.Trace.Flush()
This generates an empty file, and never writes anything too it.
While i am aware that this style of trace listener may not be ideal, i'd be
happy with it writing anything right now.
Any thoughts?
Cheers Chaps
Tris
is outputted to a file. Unfortunately, i can't find a way of enabling TRACE
token, and it just seems to skip over all System.Diagnostics.Trace lines in
the debugger.
I don't want to use the ASP page trace dump, as it will break my SOAP
interface.
This code is called on my application start event:
Dim lstrFileStream As System.IO.FileStream
Dim objTraceListener As System.Diagnostics.TraceListener
'Create Stream and Listener
lstrFileStream = New System.IO.FileStream("C:\Temp\Tracer.Log",
IO.FileMode.OpenOrCreate)
objTraceListener = New
System.Diagnostics.TextWriterTraceListener(lstrFileStream)
objTraceListener.TraceOutputOptions = Diagnostics.TraceOptions.Timestamp
'Trace Item
System.Diagnostics.Trace.Listeners.Add(objTraceListener)
This is called at the start of one of the SOAP requests:
System.Diagnostics.Trace.Write("Add Account Called.")
System.Diagnostics.Trace.Flush()
This generates an empty file, and never writes anything too it.
While i am aware that this style of trace listener may not be ideal, i'd be
happy with it writing anything right now.
Any thoughts?
Cheers Chaps
Tris