Bogdan Varlamov (a.k.a. Phantom Stranger)

Filter Logs by Changing log4net Configuration


by Bogdan Varlamov (a.k.a. Phantom Stranger)

We've all been there before--trying to track down some insipid bug which is impossible to reproduce on a developer's machine. What is the response? To add more logging of course!

That's all well and good, but eventually your log files are going to start getting huge. Don't get me wrong, I LOVE applications with good logging. (In my opinion it's much better to "overlog" than "underlog" [or not log at all!]). But, sometimes it makes sense to cut back on the amount of logging to save disk space, or to make the log files easier to digest...

How can this be done? Certainly not by removing logging from code!
Would you like to know more?

One of my clients asked me to write a very simple RESTful web service to retrieve user data (name, email, address, etc.) based on login credentials.  Having recently finished working on a PHP-driven RESTful interface for another client (based on the Zend Framework), I thought this would be a simple and straightforward task.  As comedian Bill Engvall says: "Here's your sign!".  I should have known better. Would you like to know more?