Log function
implement log() function.
This commit is contained in:
@@ -10,6 +10,7 @@ use Friendica\Content\Feature;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\DBA;
|
||||
@@ -487,10 +488,10 @@ class Post extends BaseObject
|
||||
{
|
||||
$item_id = $item->getId();
|
||||
if (!$item_id) {
|
||||
logger('[ERROR] Post::addChild : Item has no ID!!', LOGGER_DEBUG);
|
||||
Logger::log('[ERROR] Post::addChild : Item has no ID!!', LOGGER_DEBUG);
|
||||
return false;
|
||||
} elseif ($this->getChild($item->getId())) {
|
||||
logger('[WARN] Post::addChild : Item already exists (' . $item->getId() . ').', LOGGER_DEBUG);
|
||||
Logger::log('[WARN] Post::addChild : Item already exists (' . $item->getId() . ').', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
@@ -584,7 +585,7 @@ class Post extends BaseObject
|
||||
return true;
|
||||
}
|
||||
}
|
||||
logger('[WARN] Item::removeChild : Item is not a child (' . $id . ').', LOGGER_DEBUG);
|
||||
Logger::log('[WARN] Item::removeChild : Item is not a child (' . $id . ').', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -650,7 +651,7 @@ class Post extends BaseObject
|
||||
public function getDataValue($name)
|
||||
{
|
||||
if (!isset($this->data[$name])) {
|
||||
// logger('[ERROR] Item::getDataValue : Item has no value name "'. $name .'".', LOGGER_DEBUG);
|
||||
// Logger::log('[ERROR] Item::getDataValue : Item has no value name "'. $name .'".', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -667,7 +668,7 @@ class Post extends BaseObject
|
||||
private function setTemplate($name)
|
||||
{
|
||||
if (!x($this->available_templates, $name)) {
|
||||
logger('[ERROR] Item::setTemplate : Template not available ("' . $name . '").', LOGGER_DEBUG);
|
||||
Logger::log('[ERROR] Item::setTemplate : Template not available ("' . $name . '").', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user