Add Monolog

This commit is contained in:
Philipp Holzer 2018-12-30 21:42:56 +01:00 committed by Hypolite Petovan
parent 1d61645a16
commit fe8f0e0045
15 changed files with 363 additions and 121 deletions

View file

@ -1,9 +1,9 @@
<?php
use Friendica\Core\Addon;
use Friendica\BaseObject;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Update;
use Friendica\Core\Worker;
@ -332,8 +332,10 @@ function update_1298()
$fail++;
} else {
DBA::update('profile', [$translateKey => $key], ['id' => $data['id']]);
logger::log('Updated contact ' . $data['id'] . " to $translateKey " . $key .
' (was: ' . $data[$translateKey] . ')');
BaseObject::getApp()
->getLogger()
->notice('Updated contact', ['action' => 'update', 'contact' => $data['id'], "$translateKey" => $key,
'was' => $data[$translateKey]]);
Worker::add(PRIORITY_LOW, 'ProfileUpdate', $data['id']);
Contact::updateSelfFromUserID($data['id']);
GContact::updateForUser($data['id']);
@ -342,7 +344,9 @@ function update_1298()
}
}
Logger::log($translateKey . " fix completed. Success: $success. Fail: $fail");
BaseObject::getApp()
->getLogger()
->notice($translateKey . " fix completed", ['action' => 'update', 'translateKey' => $translateKey, 'Success' => $success, 'Fail' => $fail ]);
}
return Update::SUCCESS;
}