|
-
Feb 12th, 2009, 01:41 PM
#2
Re: [2005] Stringbuilder & level declaration
Re-use is something to be kept in mind & encouraged, although I think re-using to this degree may be more counter-productive than expected. As an example, hard to track issues may be introduced should the builder not be cleared (or cleared) in the expected order.
Also, I'm confident .NET (garbage collection, string interning) would handle this very efficiently, so introducing "as many" reusable objects may be a little OTT. As it's a web app, unless the logging procedures are statically hosted or state is maintained across requests, the object lifetimes will be tied to the request anyway.
To the specific question of logging: would a framework, e.g. log4net, be a little friendlier on the eyes, feasible (as some companies are somewhat difficult about third party libraries), or are you trying to implement a logging system for learning purposes?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|