Commit 02bd8efd authored by anandc's avatar anandc Committed by Commit bot

Include application ID in log entries.

BUG=b/19609728

Review URL: https://codereview.chromium.org/1066003007

Cr-Commit-Position: refs/heads/master@{#327338}
parent f79c95da
......@@ -180,6 +180,7 @@ remoting.LogToServer.prototype.log_ = function(entry) {
(new Date().getTime() - this.sessionStartTime_ -
this.authTotalTime_) / 1000.0;
entry.addSessionDuration(sessionDurationInSeconds);
entry.addApplicationId();
// The host-version will be blank for logs before a session has been created.
// For example, the signal-strategy log-entries won't have host version info.
entry.addHostVersion(this.hostVersion_);
......
......@@ -178,6 +178,9 @@ remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING_ = 'lgapp';
/** @private */
remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_ = 'unknown';
/** @private */
remoting.ServerLogEntry.KEY_APP_ID_ = 'application-id';
/**
* Sets one field in this log entry.
*
......@@ -496,6 +499,15 @@ remoting.ServerLogEntry.prototype.addModeField = function() {
remoting.ServerLogEntry.getModeField_());
};
/**
* Adds a field specifying the application ID to this log entry.
* @return {void} Nothing.
*/
remoting.ServerLogEntry.prototype.addApplicationId = function() {
this.set_(remoting.ServerLogEntry.KEY_APP_ID_, chrome.runtime.id);
};
/**
* Gets the value of the mode field to be put in a log entry.
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment