Skip to content

Commit

Permalink
More debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksTeresh committed Jun 13, 2024
1 parent 87c1f29 commit 0915974
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions importer-mankeli/src/utils/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const bulkCreate = async (model, entities, transaction, properties = ['id']) =>
try {
await model.bulkCreate(entities, {
updateOnDuplicate: getColumnsToUpdate(model, properties),
transaction
transaction,
logging: logger.info
})
} catch (error) {
logger.info(getColumnsToUpdate(model, properties))
Expand All @@ -19,7 +20,8 @@ const bulkCreate = async (model, entities, transaction, properties = ['id']) =>
try {
await model.upsert(entity, {
updateOnDuplicate: getColumnsToUpdate(model, properties),
transaction
transaction,
logging: logger.info
})
} catch (e) {
logger.error(e)
Expand Down

0 comments on commit 0915974

Please sign in to comment.