Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 1298aca

Browse files
kjin12wrigja
authored andcommitted
RELNOTES[INC]: Remove goog.debug.Logger.logToProfilers, as well as the goog.define goog.debug.ENABLE_PROFILER_LOGGING.
PiperOrigin-RevId: 358009132
1 parent e05898d commit 1298aca

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

closure/goog/debug/logger.js

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,6 @@ goog.debug.Logger.ENABLE_HIERARCHY =
311311
goog.define('goog.debug.Logger.ENABLE_HIERARCHY', true);
312312

313313

314-
/**
315-
* @define {boolean} Toggles whether active log statements are also recorded
316-
* to the profiler.
317-
*/
318-
goog.debug.Logger.ENABLE_PROFILER_LOGGING =
319-
goog.define('goog.debug.Logger.ENABLE_PROFILER_LOGGING', false);
320-
321-
322314
/**
323315
* Finds or creates a logger for a named subsystem. If a logger has already been
324316
* created with the given name it is returned. Otherwise a new logger is
@@ -339,35 +331,6 @@ goog.debug.Logger.getLogger = function(name) {
339331
};
340332

341333

342-
/**
343-
* Logs a message to profiling tools, if available.
344-
* {@see https://developers.google.com/web-toolkit/speedtracer/logging-api}
345-
* {@see http://msdn.microsoft.com/en-us/library/dd433074(VS.85).aspx}
346-
* @param {string} msg The message to log.
347-
*/
348-
goog.debug.Logger.logToProfilers = function(msg) {
349-
'use strict';
350-
// Some browsers also log timeStamp calls to the console, only log
351-
// if actually asked.
352-
if (goog.debug.Logger.ENABLE_PROFILER_LOGGING) {
353-
var msWriteProfilerMark = goog.global['msWriteProfilerMark'];
354-
if (msWriteProfilerMark) {
355-
// Logs a message to the Microsoft profiler
356-
// On IE, console['timeStamp'] may output to console
357-
msWriteProfilerMark(msg);
358-
return;
359-
}
360-
361-
// Using goog.global, as loggers might be used in window-less contexts.
362-
var console = goog.global['console'];
363-
if (console && console['timeStamp']) {
364-
// Logs a message to Firebug, Web Inspector, SpeedTracer, etc.
365-
console['timeStamp'](msg);
366-
}
367-
}
368-
};
369-
370-
371334
/**
372335
* There is a single global LogManager object that is used to maintain a set of
373336
* shared state about Loggers and log services. This is loosely based on the

closure/goog/debug/tracer.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ goog.provide('goog.debug.Trace');
1717
goog.require('goog.array');
1818
goog.require('goog.asserts');
1919
goog.require('goog.debug');
20-
goog.require('goog.debug.Logger');
2120
goog.require('goog.iter');
2221
goog.require('goog.log');
2322
goog.require('goog.structs.Map');
@@ -578,8 +577,6 @@ goog.debug.Trace_.prototype.startTracer = function(comment, opt_type) {
578577
}
579578
}
580579

581-
goog.debug.Logger.logToProfilers('Start : ' + comment);
582-
583580
/** @const */
584581
var event =
585582
/** @type {!goog.debug.Trace_.Event_} */ (this.eventPool_.getObject());
@@ -670,8 +667,6 @@ goog.debug.Trace_.prototype.stopTracer = function(id, opt_silenceThreshold) {
670667
stat.time += elapsed;
671668
}
672669
if (stopEvent) {
673-
goog.debug.Logger.logToProfilers('Stop : ' + stopEvent.comment);
674-
675670
stopEvent.totalVarAlloc = this.getTotalVarAlloc();
676671

677672
if (stat) {

0 commit comments

Comments
 (0)