forked from mirrors/Scribe.js
Tags and file infos before time
This commit is contained in:
parent
abf3bf17f9
commit
18adc5fca2
1 changed files with 12 additions and 12 deletions
|
@ -40,7 +40,7 @@
|
|||
* @return {String} timestamp to String
|
||||
*/
|
||||
var buildTime = function (timestamp) {
|
||||
return (new Date(timestamp)).toISOString() + " ";
|
||||
return (new Date(timestamp)).toISOString();
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@
|
|||
* @return {String} timestamp to string
|
||||
*/
|
||||
var buildDate = function (timestamp) {
|
||||
return (new Date(timestamp)).toDateString() + " ";
|
||||
return (new Date(timestamp)).toDateString();
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -281,20 +281,20 @@
|
|||
|
||||
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) {
|
||||
result += buildTags(log.context.tags);
|
||||
result += buildTags(log.context.tags) + " ";
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue