/** * Constructor * * @param integer $id Internal ID code of entry. * @param string $message The message to log. * @param string $priority Message priority based on {$this->priorities}. * @param string $category Type of entry. * @param string $date Date of entry (defaults to now if not specified or blank). * * @since 2.0 */ public function __construct($id, $message, $priority = JLog::INFO, $category = '', $date = null) { // Internal ID code of this specific entry. $this->id = (int) $id; // Pass the remaining attributes to the parent class for processing. parent::__construct($message, $priority, $category, $date); }
/** * Constructor * * @param string $message The message to log. * @param string $priority Message priority based on {$this->priorities}. * @param string $category Type of entry * @param string $date Date of entry (defaults to now if not specified or blank) * * @since 11.1 */ public function __construct($message, $priority = JLog::INFO, $category = '', $date = null) { if (empty($date)) { list($microtime, $time) = explode(' ', microtime()); $date = date('Y-m-d H:i:s', $time) . trim($microtime, '0'); } parent::__construct($message, $priority, $category, $date); }