public log ( string $message, integer $severity = LOG_INFO, mixed $additionalData = null, string $packageKey = null, string $className = null, string $methodName = null ) : void | ||
$message | string | The message to log |
$severity | integer | An integer value, one of the LOG_* constants |
$additionalData | mixed | A variable containing more information about the event to be logged |
$packageKey | string | Key of the package triggering the log (determined automatically if not specified) |
$className | string | Name of the class triggering the log (determined automatically if not specified) |
$methodName | string | Name of the method triggering the log (determined automatically if not specified) |
return | void |
public function log($message, $severity = LOG_INFO, $additionalData = null, $packageKey = null, $className = null, $methodName = null);
/** * Logs a SQL statement to the system logger (DEBUG priority). * * @param string $sql The SQL to be executed * @param array $params The SQL parameters * @param array $types The SQL parameter types. * @return void */ public function startQuery($sql, array $params = null, array $types = null) { // this is a safeguard for when no logger might be available... if ($this->logger !== null) { $this->logger->log($sql, LOG_DEBUG, ['params' => $params, 'types' => $types]); } }