Packager version in logs

Summary: Add Packager version to log entries.

Reviewed By: davidaurelio

Differential Revision: D4212961

fbshipit-source-id: 96036eb2dc70d959108ef5a3a14c58643aba5349
This commit is contained in:
Ovidiu Viorel Iepure 2016-11-24 04:39:13 -08:00 committed by Facebook Github Bot
parent bb1279694b
commit 1b8582a2d1
2 changed files with 5 additions and 0 deletions

View File

@ -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),
});
});

View File

@ -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,
};
}