diff --git a/server/src/database/index.js b/server/src/database/index.js index 2a8b284..87f1659 100644 --- a/server/src/database/index.js +++ b/server/src/database/index.js @@ -61,7 +61,7 @@ export async function saveTest( * Update the status of the test */ export async function updateStatus(id, status) { - log.info('Update %s with %s', id, status); + logger.info('Update %s with %s', id, status); const update = 'UPDATE sitespeed_io_test_runs SET status = $1 WHERE id = $2'; const values = [status, id]; try { diff --git a/server/src/middleware/validatescripting.js b/server/src/middleware/validatescripting.js index 43d30f2..0c0cbe9 100644 --- a/server/src/middleware/validatescripting.js +++ b/server/src/middleware/validatescripting.js @@ -13,7 +13,7 @@ export const validateScripting = (request, response, next) => { try { validRegEx = new RegExp(testDomain); } catch (error) { - log.error('Could not use regular expression', error); + logger.error('Could not use regular expression', error); request.inputValidationError = getText( 'error.nonmatchingdomain', '', diff --git a/server/src/middleware/validateurl.js b/server/src/middleware/validateurl.js index 8aa1273..d468450 100644 --- a/server/src/middleware/validateurl.js +++ b/server/src/middleware/validateurl.js @@ -53,7 +53,7 @@ export const validateURL = (request, response, next) => { return next(); } } catch (error) { - log.error('Could not use the regular expression', error); + logger.error('Could not use the regular expression', error); request.inputValidationError = getText( 'error.nonmatchingdomain', url, diff --git a/server/src/util/add-test.js b/server/src/util/add-test.js index 912b2be..3433f86 100644 --- a/server/src/util/add-test.js +++ b/server/src/util/add-test.js @@ -29,7 +29,7 @@ async function getDefaultSitespeedConfiguration() { const result = await readFile( path.resolve(nconf.get('defaultSitespeedioConfigFile')) ); - log.info('Using configiguration from defaultSitespeedioConfigFile'); + logger.info('Using configiguration from defaultSitespeedioConfigFile'); return JSON.parse(result.toString()); } else return nconf.get('sitespeed.io') || {}; } @@ -153,7 +153,7 @@ export async function addTest(request) { } ); } catch (error) { - log.error( + logger.error( `Setting status to failed for ${jobId} because queue is down`, error ); @@ -240,7 +240,7 @@ export async function addTestFromAPI( jobConfig ); } catch (error) { - log.error( + logger.error( `Setting status to failed for ${jobId} because queue is down`, error );