1

I'm helping a colleague with a legacy, spaghetti code application. There are thousands of calls in it to $firephp->log, but we're trying to track down a particular one.

Can FirePHP be configured to include, with every log statement, the location it was called from in the code?

Nathan Long
  • 122,748
  • 97
  • 336
  • 451

1 Answers1

0

FirePHP is itself written in PHP, therefore you can edit the log member function to add the tracing. In original FirePHP.class.php file, function log looks like this:

public function log($Object, $Label=null) {
    return $this->fb($Object, $Label, FirePHP::LOG);
}

If you want to log the call, simply modify this method to be:

public function log($Object, $Label=null) {
    $this->trace($Label);
    return $this->fb($Object, $Label, FirePHP::LOG);
}

P.S. I have an older version of FirePHP on my system, so your code can be slightly different, but the changes would be about the same.

Aleks G
  • 56,435
  • 29
  • 168
  • 265