-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Test-Driven Development with C++
By :
Filtering log messages is going to be one of the biggest features of the logging library. That’s why this chapter is devoting so much effort to exploring ideas and enhancing the design. Most logging libraries offer some support for filtering, but usually, it’s limited to just logging levels. And the logging levels are also usually ordered so that when you set one logging level, then you get all logs with a level equal to and either above or below the filtered level.
This always seemed arbitrary to me. Do the logging levels go up or down? Does setting the filtering level to info mean that you get debug too, or just info and error logs?
And this ignores the bigger problem of information overload. Once you do figure out how to get debug-level logs, they all get logged and the logs quickly fill up. I’ve even seen logs fill up so fast that the messages I was interested in were already zipped up and about to be deleted to...