Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding support for showSeverityLevel to the HtmlFormatter.

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...
commit 0eefeb3d9a6f0746dc4adc9994a687269ae164c8 1 parent 05ae3d3
jonlesser@google.com authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  closure/goog/debug/formatter.js
View
3  closure/goog/debug/formatter.js
@@ -252,6 +252,9 @@ goog.debug.HtmlFormatter.prototype.formatRecord = function(logRecord) {
if (this.showLoggerName) {
sb.push('[', goog.string.htmlEscape(logRecord.getLoggerName()), '] ');
}
+ if (this.showSeverityLevel) {
+ sb.push('[', goog.string.htmlEscape(logRecord.getLevel().name), '] ');
+ }
sb.push('<span class="', className, '">',
goog.string.newLineToBr(goog.string.whitespaceEscape(
goog.string.htmlEscape(logRecord.getMessage()))));
Please sign in to comment.
Something went wrong with that request. Please try again.