firephp / firephp-core

FirePHP server library for sending PHP variables to the browser.
http://www.firephp.org
224 stars 78 forks source link

Allow for Ignored Files and Classes when File and Line Number is Shown #2

Closed onfire4g05 closed 5 years ago

onfire4g05 commented 13 years ago

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.

cadorn commented 13 years ago

Sorry about not replying earlier. I was not getting notifications from github. I'll look at this later in October.

cadorn commented 11 years ago

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.

cadorn commented 5 years ago

I should get to this soon. The FirePHPCore lib is going to get some tests and then some improvements.

cadorn commented 5 years ago

I have implemented this via ignoreClassInTraces & ignorePathInTraces & lineNumberOffset in https://github.com/firephp/firephp-core/pull/55