Skip to content

Commit

Permalink
Minor fixes in helma/logging
Browse files Browse the repository at this point in the history
git-svn-id: https://dev.helma.org/svn/helma-ng/trunk@9651 688a9155-6ab5-4160-a077-9df41f55a9e9
  • Loading branch information
Hannes Wallnoefer authored and Jan-Felix Wittmann committed Apr 25, 2009
1 parent 0f69832 commit 04efcd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/helma/logging.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports.getLogger = function(name) {
// getResource('foo').name gets us the absolute path to a local resource
this.setConfig(getResource('config/log4j.properties'));
}
return org.apache.log4j.Logger.getLogger(name.replace('/', '.'));
return org.apache.log4j.Logger.getLogger(name.replace(/\//g, '.'));
}

// now that getLogger is installed we can get our own log
Expand Down Expand Up @@ -73,7 +73,7 @@ exports.handleRequest = function handleRequest(req) {
for (var i = 0; i < list.size(); i++) {
var item = list.get(i);
var msg = item[0];
var multiline = msg && msg.indexOf('\n') > 0 || msg.indexOf('\r')> 0;
var multiline = msg && msg.trim().indexOf('\n') > 0 || msg.indexOf('\r')> 0;
body.write("<div class=\"helma-debug-line\" style=\"background: #fc3;");
body.write("color: black; border-top: 1px solid black;\">");
if (multiline) {
Expand Down

0 comments on commit 04efcd4

Please sign in to comment.