Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-09-23 18:00:00 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-09-23 21:48:55 +0300
commit635e03fc71980d4b6f7b4aa2958af7a557c7f974 (patch)
tree53ba2e799afe223dbaca5e5aa1377294176626d5 /lib/Events
parent57e02700a69edccddeaa1f169cb18335e8baf5db (diff)
Add debug output to sync processes triggered via the CLI
Just like a CLI priority inbox model training gives all the details, we want to have the same to diagnose slow/faulty account syncs. This changes the console logger adapter for the PSR logger and adds it to the sync process. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Events')
-rw-r--r--lib/Events/SynchronizationEvent.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Events/SynchronizationEvent.php b/lib/Events/SynchronizationEvent.php
index 12e51968a..3af97c70e 100644
--- a/lib/Events/SynchronizationEvent.php
+++ b/lib/Events/SynchronizationEvent.php
@@ -27,19 +27,29 @@ namespace OCA\Mail\Events;
use OCA\Mail\Account;
use OCP\EventDispatcher\Event;
+use Psr\Log\LoggerInterface;
class SynchronizationEvent extends Event {
/** @var Account */
private $account;
- public function __construct(Account $account) {
+ /** @var LoggerInterface */
+ private $logger;
+
+ public function __construct(Account $account,
+ LoggerInterface $logger) {
parent::__construct();
$this->account = $account;
+ $this->logger = $logger;
}
public function getAccount(): Account {
return $this->account;
}
+
+ public function getLogger(): LoggerInterface {
+ return $this->logger;
+ }
}