Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Adding support for showSeverityLevel to the HtmlFormatter.
Browse files Browse the repository at this point in the history
Severity Level is already handled in the TextFormatter. Seems like it was just an oversight in the original code.

showSeverityLevel is false by default and I don't see any code in CodeSearch this will affect. But I need it for a console I'm working on.

R=nicksantos
DELTA=3 (3 added, 0 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=6085


git-svn-id: http://closure-library.googlecode.com/svn/trunk@2419 0b95b8e8-c90f-11de-9d4f-f947ee5921c8
  • Loading branch information
jonlesser@google.com committed Jan 7, 2013
1 parent 05ae3d3 commit 0eefeb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions closure/goog/debug/formatter.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ goog.debug.HtmlFormatter.prototype.formatRecord = function(logRecord) {
if (this.showLoggerName) { if (this.showLoggerName) {
sb.push('[', goog.string.htmlEscape(logRecord.getLoggerName()), '] '); sb.push('[', goog.string.htmlEscape(logRecord.getLoggerName()), '] ');
} }
if (this.showSeverityLevel) {
sb.push('[', goog.string.htmlEscape(logRecord.getLevel().name), '] ');
}
sb.push('<span class="', className, '">', sb.push('<span class="', className, '">',
goog.string.newLineToBr(goog.string.whitespaceEscape( goog.string.newLineToBr(goog.string.whitespaceEscape(
goog.string.htmlEscape(logRecord.getMessage())))); goog.string.htmlEscape(logRecord.getMessage()))));
Expand Down

0 comments on commit 0eefeb3

Please sign in to comment.