Jump to content

[SOLVED] Logging Debug messages to table


MrBaseball34
 Share

Recommended Posts

I wrote this function, placed it in the Tools class:

 /**
 * Logs message to ps_debug_table
 *
 * @param $module string - module where error occured
 * @param $msg string    - message to log
 */
 static public function DebugLog($_mod, $_msg) {
   Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'debug_table` (proc_id, debug_output) VALUES ('.$_mod.', '.$_msg.')') or die(self::displayError());
 }



And I call it like this, say from Products.php:

Tools::DebugLog('Product', 'In Get Products()');



However, nothing is getting inserted into the ps_debug_table.

Any ideas as to why? Am I doing something wrong here?

I've tried using the FirePHP code from ecartservice.net but it didn't work, either, I got no messages logged.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More