Log function

implement log() function.
This commit is contained in:
Adam Magness 2018-10-29 17:20:46 -04:00
parent d6d593d724
commit 14fde5dc9b
122 changed files with 1280 additions and 1161 deletions

View file

@ -5,6 +5,7 @@
namespace Friendica\Model;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
use Friendica\Util\DateTimeFormat;
@ -82,12 +83,12 @@ class Conversation
unset($conversation['source']);
}
if (!DBA::update('conversation', $conversation, ['item-uri' => $conversation['item-uri']], $old_conv)) {
logger('Conversation: update for ' . $conversation['item-uri'] . ' from ' . $old_conv['protocol'] . ' to ' . $conversation['protocol'] . ' failed',
Logger::log('Conversation: update for ' . $conversation['item-uri'] . ' from ' . $old_conv['protocol'] . ' to ' . $conversation['protocol'] . ' failed',
LOGGER_DEBUG);
}
} else {
if (!DBA::insert('conversation', $conversation, true)) {
logger('Conversation: insert for ' . $conversation['item-uri'] . ' (protocol ' . $conversation['protocol'] . ') failed',
Logger::log('Conversation: insert for ' . $conversation['item-uri'] . ' (protocol ' . $conversation['protocol'] . ') failed',
LOGGER_DEBUG);
}
}