Decrease log verbosity for feeders

This commit is contained in:
Daniil Gentili 2020-10-18 15:50:14 +02:00
parent 8445455e64
commit b0b850efe4
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 6 additions and 5 deletions

View File

@ -263,7 +263,7 @@ class FeedLoop extends ResumableSignalLoop
return yield from $this->API->feeders[self::GENERIC]->feedSingle($update);
}
}
$this->API->logger->logger('Was fed an update of type '.$update['_']." in {$this}...", \danog\MadelineProto\Logger::VERBOSE);
$this->API->logger->logger('Was fed an update of type '.$update['_']." in {$this}...", \danog\MadelineProto\Logger::ULTRA_VERBOSE);
$this->incomingUpdates[] = $update;
return $this->channelId;
}

View File

@ -21,6 +21,7 @@ namespace danog\MadelineProto\Loop\Update;
use danog\Loop\ResumableSignalLoop;
use danog\MadelineProto\Exception;
use danog\MadelineProto\Logger;
use danog\MadelineProto\Loop\InternalLoop;
use danog\MadelineProto\MTProto;
use danog\MadelineProto\RPCErrorException;
@ -123,7 +124,7 @@ class UpdateLoop extends ResumableSignalLoop
if (isset($difference['timeout'])) {
$timeout = $difference['timeout'];
}
$API->logger->logger('Got '.$difference['_'], \danog\MadelineProto\Logger::VERBOSE);
$API->logger->logger('Got '.$difference['_'], \danog\MadelineProto\Logger::ULTRA_VERBOSE);
switch ($difference['_']) {
case 'updates.channelDifferenceEmpty':
$state->update($difference);
@ -202,13 +203,13 @@ class UpdateLoop extends ResumableSignalLoop
}
}
}
$API->logger->logger("Finished parsing updates in {$this}, now resuming feeders");
$API->logger->logger("Finished parsing updates in {$this}, now resuming feeders", Logger::ULTRA_VERBOSE);
foreach ($result as $channelId => $boh) {
$API->feeders[$channelId]->resumeDefer();
}
$API->logger->logger("Finished resuming feeders in {$this}, signaling updates");
$API->logger->logger("Finished resuming feeders in {$this}, signaling updates", Logger::ULTRA_VERBOSE);
$API->signalUpdate();
$API->logger->logger("Finished signaling updates in {$this}, pausing");
$API->logger->logger("Finished signaling updates in {$this}, pausing", Logger::ULTRA_VERBOSE);
$first = false;
if (yield $this->waitSignal($this->pause($timeout * 1000))) {
$API->logger->logger("Exiting {$this} due to signal");