Skip to content

Commit 67be2b3

Browse files
committed
fix(library-sync): adjust log level for non-error messages
1 parent bb06234 commit 67be2b3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

server/api/services/library-sync-service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -658,26 +658,26 @@ export default class LibrarySyncService {
658658

659659
const security = one(page.security);
660660
if (!security) {
661-
logger.error(`Skipping ${subdomain} page ${page["@id"]}: no security property.`);
661+
logger.debug(`Skipping ${subdomain} page ${page["@id"]}: no security property.`);
662662
return false;
663663
}
664664

665665
const restriction = one(security["permissions.page"])?.restriction;
666666
if (!restriction) {
667-
logger.error(`Skipping ${subdomain} page ${page["@id"]}: no restriction property.`);
667+
logger.debug(`Skipping ${subdomain} page ${page["@id"]}: no restriction property.`);
668668
return false;
669669
}
670670

671671
const restrictionText = text(restriction['#text']);
672672
if (!restrictionText) {
673-
logger.error(`Skipping ${subdomain} page ${page["@id"]}: restriction property has no text.`);
673+
logger.debug(`Skipping ${subdomain} page ${page["@id"]}: restriction property has no text.`);
674674
return false;
675675
}
676676

677677
if (PUBLIC_RESTRICTIONS.has(restrictionText)) return true;
678678
if (UNLISTED_RESTRICTIONS.has(restrictionText)) return false;
679679

680-
logger.error(`Skipping ${subdomain} page ${page["@id"]}: unrecognized restriction ` +
680+
logger.debug(`Skipping ${subdomain} page ${page["@id"]}: unrecognized restriction ` +
681681
`"${restrictionText}". Add it to PUBLIC_RESTRICTIONS if it is publicly readable.`);
682682
return false;
683683
}

0 commit comments

Comments
 (0)