diff --git a/lib/common/dispatchers.ts b/lib/common/dispatchers.ts index 89ff7aa621..d368056199 100644 --- a/lib/common/dispatchers.ts +++ b/lib/common/dispatchers.ts @@ -19,7 +19,8 @@ export class CommandDispatcher implements ICommandDispatcher { // CommandDispatcher is called from external CLI's only, so pass the path to their package.json const sysInfo = await this.$sysInfo.getSysInfo({ pathToNativeScriptCliPackageJson: path.join(__dirname, "..", "..", "package.json") }); this.$logger.trace("System information:"); - this.$logger.trace(sysInfo); + this.$logger.trace(JSON.stringify(sysInfo, null, 2)); + this.$logger.trace("Current CLI version: ", this.$staticConfig.version); } let commandName = this.getCommandName(); diff --git a/lib/nativescript-cli.ts b/lib/nativescript-cli.ts index 39b6479e60..15717ac734 100644 --- a/lib/nativescript-cli.ts +++ b/lib/nativescript-cli.ts @@ -12,7 +12,10 @@ const originalProcessOn = process.on; process.on = (event: string, listener: any): any => { if (event === "SIGINT") { - logger.trace(new Error(`Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal`).stack); + logger.trace(`Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.`); + const msg = "The stackTrace of the location trying to handle SIGINT is:"; + const stackTrace = new Error(msg).stack || ''; + logger.trace(stackTrace.replace(`Error: ${msg}`, msg)); } else { return originalProcessOn.apply(process, [event, listener]); } diff --git a/lib/services/project-changes-service.ts b/lib/services/project-changes-service.ts index c31e349fd6..c252af61cd 100644 --- a/lib/services/project-changes-service.ts +++ b/lib/services/project-changes-service.ts @@ -229,7 +229,6 @@ export class ProjectChangesService implements IProjectChangesService { const dirName = path.basename(dir); this.$logger.trace(`containsNewerFiles will check ${dir}`); if (_.startsWith(dirName, '.')) { - this.$logger.trace(`containsNewerFiles returns false for ${dir} as its name starts with dot (.) .`); return false; } @@ -258,7 +257,6 @@ export class ProjectChangesService implements IProjectChangesService { } } - this.$logger.trace(`containsNewerFiles returns false for ${dir}.`); return false; } diff --git a/lib/services/webpack/webpack-compiler-service.ts b/lib/services/webpack/webpack-compiler-service.ts index e46474bdf8..807d5a28ec 100644 --- a/lib/services/webpack/webpack-compiler-service.ts +++ b/lib/services/webpack/webpack-compiler-service.ts @@ -33,6 +33,8 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp const childProcess = await this.startWebpackProcess(platformData, projectData, prepareData); childProcess.on("message", (message: string | IWebpackEmitMessage) => { + this.$logger.trace("Message from webpack", message); + if (message === "Webpack compilation complete.") { this.$logger.info("Webpack build done!"); resolve(childProcess); @@ -74,6 +76,7 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp platform: platformData.platformNameLowerCase }; + this.$logger.trace("Generated data from webpack message:", data); if (data.files.length) { this.emit(WEBPACK_COMPILATION_COMPLETE, data); }