Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve log messages to include registryId for easier debugging #1196

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/tasks/sync-registries.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const syncOrganizationAudit = async (organization) => {

if (!lastRootSavedToAuditTable) {
logger.info(
`Syncing new registry ${organization.name} (store ${organization.orgUid})`,
`Syncing new registry ${organization.name} (orgUid ${organization.orgUid}, registryId ${organization.registryId})`,
);

logger.debug(`creating 'CREATE REGISTRY' audit entry`);
Expand Down Expand Up @@ -317,10 +317,10 @@ const syncOrganizationAudit = async (organization) => {
// Organization not synced, sync it
logger.info(' ');
logger.info(
`Syncing ${organization.name} generation index ${toBeProcessedDatalayerGenerationIndex} (store ${organization.orgUid})`,
`Syncing ${organization.name} generation index ${toBeProcessedDatalayerGenerationIndex} (orgUid ${organization.orgUid}, registryId ${organization.registryId})`,
);
logger.info(
`${organization.name} is ${syncRemaining} DataLayer generations away from being fully synced (store ${organization.orgUid}).`,
`${organization.name} is ${syncRemaining} DataLayer generations away from being fully synced (orgUid ${organization.orgUid}, registryId ${organization.registryId}).`,
);

if (!CONFIG.USE_SIMULATOR) {
Expand Down Expand Up @@ -395,7 +395,7 @@ const syncOrganizationAudit = async (organization) => {

if (!_.get(rootToBeProcessed, 'confirmed')) {
logger.info(
`Waiting for the latest root for ${organization.name} to confirm (store ${organization.orgUid})`,
`Waiting for the latest root for ${organization.name} to confirm (orgUid ${organization.orgUid}, registryId ${organization.registryId})`,
);
return;
}
Expand Down Expand Up @@ -434,7 +434,7 @@ const syncOrganizationAudit = async (organization) => {

const updateTransaction = async (transaction, mirrorTransaction) => {
logger.info(
`Syncing ${organization.name} generation ${toBeProcessedDatalayerGenerationIndex} (store ${organization.orgUid})`,
`Syncing ${organization.name} generation ${toBeProcessedDatalayerGenerationIndex} (orgUid ${organization.orgUid}, registryId ${organization.registryId})`,
);
if (_.isEmpty(optimizedKvDiff)) {
const auditData = {
Expand Down
Loading