Every project needs logging functionality of some form. Logging in my case is the ability to persists information beyond the app lifecycle, a debugging session or even multiple app runs. The easiest way to persists information is to write them to a file. The file option makes the export and evaluation of the information easy and straight forward.
For the ease of use you can just call a static method to write to the log file. Like so.
Is that simple, or not?
Why talking and blogging about something that simple as that tiny library? Well, I’m working everyday with huge libraries like Spring.net, the Enterprise Library and the WPContrib. They are all great and offer a huge set of functionality. On the other hand, with many features comes a lot of overhead that is not necessary all the time. Sometimes you just need a logger, a converter or a json serializer.
Keine Kommentare:
Kommentar veröffentlichen