From 4882109de3226c0e059074e06068e40767cf89fc Mon Sep 17 00:00:00 2001 From: Rosen Vladimirov Date: Sun, 24 Feb 2019 11:19:33 +0200 Subject: [PATCH] fix: print messages from hooks only with `--log trace` Currently several messages from hooks are printed as warnings or information messages. They do not have any information for the users, so move them to the trace output. --- src/lib/before-prepare.js | 4 ++-- src/lib/compiler.js | 4 ++-- src/lib/watch.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/before-prepare.js b/src/lib/before-prepare.js index 1aa748c..fdb54ee 100644 --- a/src/lib/before-prepare.js +++ b/src/lib/before-prepare.js @@ -4,9 +4,9 @@ module.exports = function ($logger, $projectData, $usbLiveSyncService) { var liveSync = $usbLiveSyncService.isInitialized; var bundle = $projectData.$options.bundle; if (liveSync || bundle) { - $logger.warn("Hook skipped because either bundling or livesync is in progress.") + $logger.trace("Hook skipped because either bundling or livesync is in progress.") return; } - + return converter.convert($logger, $projectData.projectDir, $projectData.appDirectoryPath, $projectData.appResourcesDirectoryPath); } \ No newline at end of file diff --git a/src/lib/compiler.js b/src/lib/compiler.js index 0110333..3942eea 100644 --- a/src/lib/compiler.js +++ b/src/lib/compiler.js @@ -15,12 +15,12 @@ function compile(data) { return new Promise((res, rej) => { var projectDir = data.projectDir, appDir = data.appDir; - + var logger = new LogProvider(data.logger); var sassPath = require.resolve('node-sass/bin/node-sass'); if (fs.existsSync(sassPath)) { - logger.info("Found peer node-sass"); + logger.trace("Found peer node-sass"); } else { isResolved = true; rej(new Error('node-sass installation local to project was not found. Install by executing `npm install node-sass`.')); diff --git a/src/lib/watch.js b/src/lib/watch.js index 46eea35..62bef4e 100644 --- a/src/lib/watch.js +++ b/src/lib/watch.js @@ -4,7 +4,7 @@ module.exports = function (logger, projectData, usbLiveSyncService, hookArgs) { if (hookArgs.config) { const appFilesUpdaterOptions = hookArgs.config.appFilesUpdaterOptions; if (appFilesUpdaterOptions.bundle) { - logger.warn("Hook skipped because bundling is in progress.") + logger.trace("Hook skipped because bundling is in progress.") return; } }