TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jeff
NA
15
0
Tracing and Listners Question
May 5 2010 10:16 PM
I am trying to learn about tracing and listeners etc but am having a bit of trouble getting it to work.
I have this in my web config file:
<configuration>
--Other web config stuff here--
<system.diagnostics>
<trace autoflush="true"/>
<sources>
<source name="mySource"
switchName="mySwitch"
switchType="System.Diagnostics.SourceSwitch" >
<listeners>
<clear/>
<add name="delimitedListener"
type="System.Diagnostics.DelimitedListTraceListener"
delimiter="|"
initializeData="textlog.txt"
traceOutputOptions="ProcessId, DateTime" />
</listeners>
</source>
</sources>
<switches>
<add name="mySwitch" value="Verbose" />
</switches>
</system.diagnostics>
And this is the code behind and aspx page.
protected void Page_Load(object sender, EventArgs e)
{
TraceSource source = new TraceSource("mySource");
source.TraceEvent(TraceEventType.Verbose, 0, "Information Message");
}
However, when I run the page, I don't get a log file generated.
Can someone please explain why and how?
Thanks
Jeff
Reply
Answers (
0
)
Help with releasing image file so I can delete it from folder
How can I: Create a dynamic ErrorProvider?