fixed missing space between log data elements
This commit is contained in:
@@ -44,6 +44,9 @@ function formatLogData(logData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
data.forEach(function (item) {
|
data.forEach(function (item) {
|
||||||
|
if (output) {
|
||||||
|
output += ' ';
|
||||||
|
}
|
||||||
if (item && item.stack) {
|
if (item && item.stack) {
|
||||||
output += item.stack;
|
output += item.stack;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -57,14 +57,14 @@ vows.describe('log4js layouts').addBatch({
|
|||||||
},
|
},
|
||||||
'should support the console.log format for the message' : function(layout) {
|
'should support the console.log format for the message' : function(layout) {
|
||||||
assert.equal(layout({
|
assert.equal(layout({
|
||||||
data: ["thing %d", 1]
|
data: ["thing %d", 1, "cheese"]
|
||||||
, startTime: new Date(2010, 11, 5, 14, 18, 30, 45)
|
, startTime: new Date(2010, 11, 5, 14, 18, 30, 45)
|
||||||
, categoryName: "cheese"
|
, categoryName: "cheese"
|
||||||
, level : {
|
, level : {
|
||||||
colour: "green"
|
colour: "green"
|
||||||
, toString: function() { return "ERROR"; }
|
, toString: function() { return "ERROR"; }
|
||||||
}
|
}
|
||||||
}), "thing 1");
|
}), "thing 1 'cheese'");
|
||||||
},
|
},
|
||||||
'should output the first item even if it is not a string': function(layout) {
|
'should output the first item even if it is not a string': function(layout) {
|
||||||
assert.equal(layout({
|
assert.equal(layout({
|
||||||
|
|||||||
Reference in New Issue
Block a user