6.4. On-Demand Logging

Wouldn't it be nice if you could dynamically control how verbose the logging is in your program? Sure, you can use a -v switch on the command line when starting the program, but that's not exactly dynamic. Also, it would be nice if you could independently control the log level in different parts of your program. That way, you could zoom in to study a particular piece of code. This section describes how you use an RTA table called Logit and code from the Laddie appliance to independently control the log thresholds in different parts of your code, while your program is running. Figure 6-3 illustrates the idea of giving different parts of a program different thresholds for logging.

Here is the definition for a row in the Logit ...

Get Linux Appliance Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.