Skip to content

Commit

Permalink
Support using named loggers in the log panel, use a named logger in h…
Browse files Browse the repository at this point in the history
…awtio-core start message
  • Loading branch information
gashcrumb committed Oct 22, 2013
1 parent bc6cf19 commit f4ed40e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/core/js/corePlugin.ts
Expand Up @@ -366,7 +366,7 @@ angular.module('hawtioCore', ['bootstrap', 'ngResource', 'ui', 'ui.bootstrap.dia

setTimeout(() => {
$("#main-body").fadeIn(2000).after(() => {
Logger.info("Hawtio started!");
Logger.get('Core').info("Hawtio started!");
});
}, 500);

Expand Down
10 changes: 7 additions & 3 deletions hawtio-web/src/main/webapp/index.html
Expand Up @@ -279,6 +279,10 @@ <h2 title="Status Code: {{connectFailure.status}}">Cannot Connect: {{connectFail
};
}

var isArrayOrObject = function(o) {
return (!!o) && (o.constructor === Array || o.constructor === Object);
};


Logger.setHandler(function(messages, context) {
// MyConsole.log("context: ", context);
Expand All @@ -289,10 +293,10 @@ <h2 title="Status Code: {{connectFailure.status}}">Cannot Connect: {{connectFail
var node = document.createElement("li");

var text = ""
if (context.name) {
messages[0] = "[" + context.name + "] " + messages[0];
}

var isArrayOrObject = function(o) {
return (!!o) && (o.constructor === Array || o.constructor === Object);
};

for (var i = 0; i < messages.length; i++) {
var message = messages[i];
Expand Down

0 comments on commit f4ed40e

Please sign in to comment.