Skip to content

Commit

Permalink
more loggin
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Jun 9, 2020
1 parent f8ed709 commit 93cb206
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/Service/DavService.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ function(Circle $circle) {
);

$this->miscService->log(
'manage Circles from DavCard: ' . json_encode($fromCard) . ' - current: ' . json_encode($current)
'manage Circles from DavCard: ' . json_encode($fromCard) . ' - current: ' . json_encode($current),
0
);

$this->manageNewCircles($davCard, $fromCard, $current);
Expand Down Expand Up @@ -628,6 +629,9 @@ private function getExistingCirclesFromBook(int $bookId): array {
);
foreach ($cards as $card) {
$davCard = $this->generateDavCardFromCard($bookId, $card);
$this->miscService->log(
'extracting existing Circles from DavCard Model: ' . json_encode($davCard)
);
$this->assignCirclesToCard($davCard);
$circles = array_merge($circles, $davCard->getCircles());
}
Expand Down Expand Up @@ -695,6 +699,8 @@ private function migrateBook(int $bookId) {
$davCard->setAddressBookId($bookId);
$davCard->setCardUri($card['uri']);

$this->miscService->log('migrateBook davCard Model: ' . json_encode($davCard));

$this->manageDavCard($davCard);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Service/MiscService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(ILogger $logger, $appName, IUserManager $userManager
$this->userManager = $userManager;
}

public function log($message, $level = 4) {
public function log($message, $level = 2) {
$data = array(
'app' => $this->appName,
'level' => $level
Expand Down

0 comments on commit 93cb206

Please sign in to comment.