Just starting to use Joomla over Seagull and finding that I miss the debug log. In fact debugging in general seems a bit of a pain. I keep getting 500 server errors for no reason I can work out.
Here’s what I am doing now to simulate the SGL::logMessage() function.
In each file …
jimport('joomla.error.log');
In each class I create …
private $log = NULL;
function __construct($config = array()){
parent::__construct($config);
$options = array('format' => "{DATE} {TIME} {FUNCTION}: {COMMENT}");
$this->log = &JLog::getInstance('debug.log.hqevent.log',$options);
$this->log->addEntry(array('function' => __CLASS__ . '.' . __FUNCTION__, 'comment' => ""));
}
Then at the top of each function within each class ..
$this->log->addEntry(array('function' => __CLASS__ . '.' . __FUNCTION__, 'comment' => ""));
And I do want to add a comment, then add something in the comment value, e.g.
$this->log->addEntry(array('function' => __CLASS__ . '.' . __FUNCTION__, 'comment' => "alias = [$alias]"));