public static void
add
(mixed $entry, mixed $priority = self::INFO, mixed $category = '', mixed $date = null, array $context = array())
/**
* Method to add an entry to the log.
*
* @param mixed $entry The LogEntry object to add to the log or the message for a new LogEntry object.
* @param integer $priority Message priority.
* @param string $category Type of entry
* @param string $date Date of entry (defaults to now if not specified or blank)
* @param array $context An optional array with additional message context.
*
* @return void
*
* @since 1.7.0
*/
public static function add($entry, $priority = self::INFO, $category = '', $date = null, array $context = array())
{
// Automatically instantiate the singleton object if not already done.
if (empty(static::$instance)) {
static::setInstance(new static());
}
// If the entry object isn't a LogEntry object let's make one.
if (!$entry instanceof LogEntry) {
$entry = new LogEntry((string) $entry, $priority, $category, $date, $context);
}
static::$instance->addLogEntry($entry);
}