firephp / firephp-core

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

Option for call location trace displacement #51

Closed tylla closed 5 years ago

tylla commented 5 years ago

I am trying to introduce FirePHP to an existing project. (BTW I really love the whole concept) The project uses a 'home made' but quite nice log system which offers a simple opportunity to use FirePHP-Core from one central location, but this poses a problem. All the log entries in the devtools FirePHP log show exact the same calling location, no wonder as this is the single place where FB::log() gets called. This could be solved easily if FirePHP had an option to ignore the first 'n' entries from the trace but I couldn't find such an option (I tried to take a look into the code but no result). Does such option exist (and I overlooked it) or if not could it be added?

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

lineNumberOffset option now on master: https://github.com/firephp/firephp-core/blob/master/tests/Features/09-Wrappers.php#L51

tylla commented 5 years ago

Nice job. Works as it should. Thanks!