mirror of
https://github.com/friendica/friendica
synced 2025-04-27 16:30:10 +00:00
Log function
implement log() function.
This commit is contained in:
parent
d6d593d724
commit
14fde5dc9b
122 changed files with 1280 additions and 1161 deletions
|
@ -8,6 +8,7 @@ use Friendica\BaseObject;
|
|||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
|
@ -38,12 +39,12 @@ class Cron
|
|||
if ($last) {
|
||||
$next = $last + ($poll_interval * 60);
|
||||
if ($next > time()) {
|
||||
logger('cron intervall not reached');
|
||||
Logger::log('cron intervall not reached');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
logger('cron: start');
|
||||
Logger::log('cron: start');
|
||||
|
||||
// Fork the cron jobs in separate parts to avoid problems when one of them is crashing
|
||||
Hook::fork($a->queue['priority'], "cron");
|
||||
|
@ -124,7 +125,7 @@ class Cron
|
|||
// Poll contacts
|
||||
self::pollContacts($parameter, $generation);
|
||||
|
||||
logger('cron: end');
|
||||
Logger::log('cron: end');
|
||||
|
||||
Config::set('system', 'last_cron', time());
|
||||
|
||||
|
@ -287,7 +288,7 @@ class Cron
|
|||
$priority = PRIORITY_LOW;
|
||||
}
|
||||
|
||||
logger("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact['priority'] . " " . $contact["nick"] . " " . $contact["name"]);
|
||||
Logger::log("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact['priority'] . " " . $contact["nick"] . " " . $contact["name"]);
|
||||
|
||||
Worker::add(['priority' => $priority, 'dont_fork' => true], 'OnePoll', (int)$contact['id']);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue