CSharpFeeds - All your C# feeds in one place.

Wednesday, May 03, 2006

Poor Man's Logger

by carl@vinebranches.com via i am a camera on 5/3/2006 5:22:00 PM

I saw a coworker use this technique the other day and thought it clever. I'm sure he's not the first to use it, but it can come in handy especially in static functions without a formal logger. This C# code will generate null files in your "temp" directory. The filenames will be sequenced based on a timestamp at the front, then the information you're tracking behind. The Regex.Replace is necessary to weed out the characters that Windows does not allow in filenames, and the length check keeps ...

[ read more ]

Poor Man's Logger

by carl camera via i am a camera on 5/3/2006 5:22:00 PM

I saw a coworker use this technique the other day and thought it clever. I'm sure he's not the first to use it, but it can come in handy especially in static functions without a formal logger. This C# code will generate null files in your "temp" directory. The filenames will be sequenced based on a timestamp at the front, then the information you're tracking behind. The Regex.Replace is necessary to weed out the characters that Windows does not allow in filenames, and the length check keeps ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us