Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: remoting/webapp/crd/js/log_to_server.js

Issue 1066003007: Include application ID in log entries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to pick up latest changes. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | remoting/webapp/crd/js/server_log_entry.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Module for sending log entries to the server. 7 * Module for sending log entries to the server.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 * @private 173 * @private
174 * @param {remoting.ServerLogEntry} entry 174 * @param {remoting.ServerLogEntry} entry
175 */ 175 */
176 remoting.LogToServer.prototype.log_ = function(entry) { 176 remoting.LogToServer.prototype.log_ = function(entry) {
177 // Log the time taken to get to this point from the time this session started. 177 // Log the time taken to get to this point from the time this session started.
178 // Exclude time taken for authorization. 178 // Exclude time taken for authorization.
179 var sessionDurationInSeconds = 179 var sessionDurationInSeconds =
180 (new Date().getTime() - this.sessionStartTime_ - 180 (new Date().getTime() - this.sessionStartTime_ -
181 this.authTotalTime_) / 1000.0; 181 this.authTotalTime_) / 1000.0;
182 entry.addSessionDuration(sessionDurationInSeconds); 182 entry.addSessionDuration(sessionDurationInSeconds);
183 entry.addApplicationId();
183 // The host-version will be blank for logs before a session has been created. 184 // The host-version will be blank for logs before a session has been created.
184 // For example, the signal-strategy log-entries won't have host version info. 185 // For example, the signal-strategy log-entries won't have host version info.
185 entry.addHostVersion(this.hostVersion_); 186 entry.addHostVersion(this.hostVersion_);
186 187
187 // Send the stanza to the debug log. 188 // Send the stanza to the debug log.
188 console.log('Enqueueing log entry:'); 189 console.log('Enqueueing log entry:');
189 entry.toDebugLog(1); 190 entry.toDebugLog(1);
190 191
191 var stanza = '<cli:iq to="' + remoting.settings.DIRECTORY_BOT_JID + '" ' + 192 var stanza = '<cli:iq to="' + remoting.settings.DIRECTORY_BOT_JID + '" ' +
192 'type="set" xmlns:cli="jabber:client">' + 193 'type="set" xmlns:cli="jabber:client">' +
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 }; 267 };
267 268
268 /** 269 /**
269 * @param {string} hostVersion Version of the host for current session. 270 * @param {string} hostVersion Version of the host for current session.
270 * @return {void} Nothing. 271 * @return {void} Nothing.
271 */ 272 */
272 remoting.LogToServer.prototype.setHostVersion = function(hostVersion) { 273 remoting.LogToServer.prototype.setHostVersion = function(hostVersion) {
273 this.hostVersion_ = hostVersion; 274 this.hostVersion_ = hostVersion;
274 }; 275 };
275 276
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/crd/js/server_log_entry.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698