diff --git a/packages/core/core/src/events.ts b/packages/core/core/src/events.ts index 994449a3d..23f6d9847 100644 --- a/packages/core/core/src/events.ts +++ b/packages/core/core/src/events.ts @@ -59,6 +59,12 @@ export class EmbarkEmitter extends EventEmitter { super(); if (options) { this.debugLog = options.debugLog; + } else { + this.debugLog = { + log: () => {}, + getStackTrace: () => { return ""; }, + isEnabled: () => { return false; } + }; } } diff --git a/packages/core/typings/src/embark.d.ts b/packages/core/typings/src/embark.d.ts index 69a053b35..fbaa37496 100644 --- a/packages/core/typings/src/embark.d.ts +++ b/packages/core/typings/src/embark.d.ts @@ -73,6 +73,7 @@ export interface Embark { fs: any; config: Config; currentContext: string[]; + logId: any; registerActionForEvent( name: string, action: (params: any, cb: (error: any, result: any) => void) => void, diff --git a/packages/embark/src/lib/core/plugins.js b/packages/embark/src/lib/core/plugins.js index 74fb4e7ff..dfa1fe220 100644 --- a/packages/embark/src/lib/core/plugins.js +++ b/packages/embark/src/lib/core/plugins.js @@ -17,6 +17,15 @@ var Plugins = function(options) { this.fs = fs; this.env = options.env; this.version = options.version; + + if (!this.debugLog) { + this.debugLog = { + log: () => { }, + moduleInit: () => { return ""; }, + getStackTrace: () => { return ""; }, + isEnabled: () => { return false; } + }; + } }; Plugins.deprecated = {