firephp/firephp-core — Issue #3: setObjectFilter() should allow to exclude all members of an object
Author: lorenzos
Created: 2011-12-15 22:21:26+00:00
State: open

Hi. I was using FirePHP when suddenly PHP goes out of memory because of FirePHP. I spent a lot of time trying to detect where is the problem. I discovered I was logging **an Exception's back-trace unbelievably full of data**: the data comes from Smarty (template engine) variables, that are referenced almost everywhere on stack trace.

Ok, I said, it's not FirePHP fault. I reduced `maxDepth` and the problem went away. But that affected my FirePHP logs too much, lot of logged objects are truncated (**I have to log very deep** but not huge objects, ok).

Then I saw there's an interesting `setObjectFilter()` method. Cool, but there's a problem. **I need to exclude full** `Smarty_Internal_Template` (and others) **objects**, and that method let me exclude only specified members of it (a lot, I cannot list them them all!).

So, what about alter that method making the `$Filter` parameter optional? If not passed, a special value is set in `$this->objectFilters[strtolower($Class)]`, for example `TRUE`, so FirePHP **can exclude any member** easily? I can fork your repo and do the job, if it's ok.