diff --git a/react-packager/src/Logger/__tests__/Logger-test.js b/react-packager/src/Logger/__tests__/Logger-test.js index d99f541d..b4b067b1 100644 --- a/react-packager/src/Logger/__tests__/Logger-test.js +++ b/react-packager/src/Logger/__tests__/Logger-test.js @@ -37,6 +37,7 @@ describe('Logger', () => { expect(logEntry).toEqual({ log_entry_label: 'Test', log_session: jasmine.any(String), + packager_version: jasmine.any(String), }); }); @@ -47,6 +48,7 @@ describe('Logger', () => { action_phase: 'start', log_entry_label: 'Test', log_session: jasmine.any(String), + packager_version: jasmine.any(String), start_timestamp: jasmine.any(Object), }); }); @@ -59,6 +61,7 @@ describe('Logger', () => { duration_ms: jasmine.any(Number), log_entry_label: 'Test', log_session: jasmine.any(String), + packager_version: jasmine.any(String), start_timestamp: jasmine.any(Object), }); }); diff --git a/react-packager/src/Logger/index.js b/react-packager/src/Logger/index.js index d03fe81f..159ff2e6 100644 --- a/react-packager/src/Logger/index.js +++ b/react-packager/src/Logger/index.js @@ -13,6 +13,7 @@ const chalk = require('chalk'); const os = require('os'); +const pkgjson = require('../../../package.json'); const {EventEmitter} = require('events'); @@ -36,6 +37,7 @@ function createEntry(data: LogEntry | string): LogEntry { return { ...logEntry, log_session, + packager_version: pkgjson.version, }; }