471,056 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,056 software developers and data experts.

finetuning .NET 2.0 tracing

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?

Oct 10 '06 #1
2 1154
You might be able to do this by building a wrapper for the
TextWriterTraceListener class?

bonk wrote:
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?
Oct 10 '06 #2
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
Oct 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Paul Ibison | last post: by
5 posts views Thread by Dabbler | last post: by
6 posts views Thread by serge calderara | last post: by
2 posts views Thread by deepukutty | last post: by
reply views Thread by cnys | last post: by
reply views Thread by rehto | last post: by
2 posts views Thread by bonk | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.