using logging when writing plugin

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
pcause
Bear Rating Master
Bear Rating Master
Posts: 144
Joined: 23 Aug 2013, 19:52

using logging when writing plugin

Postby pcause » 05 Nov 2013, 17:53

I am new to php and am trying to write a plugin. My plugin allows the user to have more control of the dates range for "mark read", so that you can mark things read that are older than M hours/days/weeks. I've made good progress (added the new plugin to the actions menu and have the action popping up a form to fill in the user's choice of criteria) but before I apply changes to the database I want to log the query that I am going to use and examine it. I thought I had looked at the code and figured this out but I can't get things to log. I thought this is what I should use:

Code: Select all


   if (class_exists("Logger"))
      Logger::get()->log_error($errno, $errstr, $file, $line, $context);


but when I go to preferences and the log tab (logging to sql) I don't see anything. I've done a few searches and looked at the wiki and don't see anything on this so I am hoping someone else can help me out here.

Return to “Support”

Who is online

Users browsing this forum: No registered users and 13 guests