Closed onfire4g05 closed 5 years ago
Sorry about not replying earlier. I was not getting notifications from github. I'll look at this later in October.
I have been reluctant to pull this because I have been meaning to cleanup all the file exclusion logic. Its a pretty big mess right now. We need tests before we can do that properly and release a new version.
I would welcome a PR to do this along with tests.
I should get to this soon. The FirePHPCore lib is going to get some tests and then some improvements.
I have implemented this via ignoreClassInTraces
& ignorePathInTraces
& lineNumberOffset
in https://github.com/firephp/firephp-core/pull/55
Like hameedullah, I too have a wrapper of sorts which allows me to call more than just FirePHP for logging and error handling. The problem with that is the file that would show would be from my wrapper or it's wrapper. I've changed the FirePHP PHP 5 class to allow for files and classes be excluded. This could be helpful in other situations as well, such as if you have a database wrapper and want to get that actual script and line that called the query command instead of the database class.
Usage:
$this->firephp = \FirePHP::getInstance(true); $this->firephp ->ignoreClass('ClassName') ->ignoreFile('/path/to/my/file.php');
Maybe this can get merged, or at the very least help someone else who needs the same functionality.