On Sun, Dec 27, 2009 at 11:08 PM, William A. Rowe Jr. <[email protected]> wrote: > Dan Poirier wrote: >> >> Looking at log_error_core(), it appears that if the logging level is set >> to disallow a particular message from being logged, that >> log_error_core() returns before doing any argument processing. So the >> overhead would only consist of a few function calls, and my sense would >> be that saving that wouldn't make a big difference. > > You describe the internal arg processing. Keep in mind that fn args aren't > conditionally processed, they must be created before being passed to the > function. If we can dodge that with a module query 'is mod_foo at loglevel > debug here?' then we can optimize this considerably. > > A minimum vector is per-vhost-per-module, but per-dir-per-module would be > even better :) At that granularity, and adding per-mod forensics, the user > can be grabbing lots of detail on one specific module in the single context > that is causing that module to misbehave.
Yes, see the implementation of the Noit Logger which I linked to, it uses a Macro to check if a logger is enabled, so you don't have the function arg prep/frame overhead if a logger isn't enabled.
