Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit bba32e3

Browse files
add logging
1 parent d304eb1 commit bba32e3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/services/timelineService.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const QUERY_UPDATE_TIMELINE_NOTIFICATIONS = 'UPDATE project_info SET value = "On
3030
* @param {String} dateStr the date in string format
3131
*/
3232
function formatDate (dateStr) {
33+
logger.info(`Formatting date ${dateStr}`)
3334
return momentTZ.tz(dateStr, config.TIMEZONE).format('YYYY-MM-DD HH:mm:ss')
3435
}
3536

@@ -125,6 +126,20 @@ async function createPhase (challengeLegacyId, phaseTypeId, statusTypeId, schedu
125126
try {
126127
await connection.beginTransactionAsync()
127128
const query = await prepare(connection, QUERY_INSERT_CHALLENGE_PHASE)
129+
logger.debug(`Query data: ${JSON.stringify([
130+
nextId,
131+
challengeLegacyId,
132+
phaseTypeId,
133+
statusTypeId,
134+
formatDate(scheduledStartDate),
135+
formatDate(scheduledStartDate),
136+
formatDate(scheduledEndDate),
137+
formatDate(actualStartDate),
138+
formatDate(actualEndDate),
139+
duration,
140+
createdBy,
141+
createdBy
142+
])}`)
128143
result = await query.executeAsync([
129144
nextId,
130145
challengeLegacyId,

0 commit comments

Comments
 (0)