Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

Tip: Looking for answers? Try searching our database.

finetuning .NET 2.0 tracing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bonk - 10 Oct 2006 08:06 GMT
I am using .NET 2.0 tracing to log messages within my application and
app.config (<System.Diagnostics>) to configure it. I would like to be
able to configure tracing in a finer grained manner than it is
currently possibile out of the box. Especially I would like

1. the filnames where the traceevent end up to be dynamically generated
(e.g. based on date and the tracesource). This should be configurable
somewhere in the app.config by specifying a pattern (e.g.
"tracesourceName_yyyy-mm-dd.log").

2. a new file to be generated whenever the filesize of the current
logfile exceeds a certain size. This should also be configurable in the
app.config (i.e. filesize threshold or number of traceevents).

What would be a good way to implement this without too much reinventing
the wheel?
Chris Fulstow - 10 Oct 2006 09:10 GMT
You might be able to do this by building a wrapper for the
TextWriterTraceListener class?

> I am using .NET 2.0 tracing to log messages within my application and
> app.config (<System.Diagnostics>) to configure it. I would like to be
[quoted text clipped - 12 lines]
> What would be a good way to implement this without too much reinventing
> the wheel?
Markus - 10 Oct 2006 16:08 GMT
> What would be a good way to implement this without too much
> reinventing the wheel?

Have a look at Microsoft Enterprise Library, especially the Logging Block.

hth
Markus

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.