Tags and file infos before time

This commit is contained in:
Guillaume Wuip 2014-10-26 12:18:41 +01:00
parent abf3bf17f9
commit 18adc5fca2

View file

@ -40,7 +40,7 @@
* @return {String} timestamp to String * @return {String} timestamp to String
*/ */
var buildTime = function (timestamp) { var buildTime = function (timestamp) {
return (new Date(timestamp)).toISOString() + " "; return (new Date(timestamp)).toISOString();
}; };
/** /**
@ -50,7 +50,7 @@
* @return {String} timestamp to string * @return {String} timestamp to string
*/ */
var buildDate = function (timestamp) { var buildDate = function (timestamp) {
return (new Date(timestamp)).toDateString() + " "; return (new Date(timestamp)).toDateString();
}; };
/** /**
@ -281,20 +281,20 @@
var result = ""; var result = "";
if (opt.time && log.context.time) {
result += buildTime(log.context.time);
}
if (opt.date && log.context.time) {
result += buildDate(log.context.time);
}
if (opt.tags && log.context.tags) { if (opt.tags && log.context.tags) {
result += buildTags(log.context.tags); result += buildTags(log.context.tags) + " ";
} }
if (opt.location && log.context.location.filename && log.context.location.line) { if (opt.location && log.context.location.filename && log.context.location.line) {
result += buildFileInfos(log.context.location); result += buildFileInfos(log.context.location) + " ";
}
if (opt.time && log.context.time) {
result += buildTime(log.context.time) + " ";
}
if (opt.date && log.context.time) {
result += buildDate(log.context.time) + " ";
} }
if (result.length > 0) { //if there is context string if (result.length > 0) { //if there is context string