You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had the same challenge while working on this. Created a log.js file as a workaround, which I call to generate logs:
const dateTimeMapper = function(formatArr){
let transformedObj = {};
for (let format of formatArr){
transformedObj[format["type"]] = format["value"];
}
return transformedObj;
}
const getLogPrefix = function(){
let timeFields = ["year", "month", "day", "hour", "minute", "second", "dayPeriod"];
let dateTimeFormat = new Intl.DateTimeFormat('en', { year: 'numeric', month: 'short', day: '2-digit' , hour : '2-digit', minute : '2-digit', second : '2-digit'});
let arr = dateTimeFormat.formatToParts(new Date()).filter(format => ~timeFields.indexOf(format["type"]));
let dateTimeMap = dateTimeMapper(arr);
if(dateTimeMap){
return dateTimeMap["year"]+"-"+dateTimeMap["month"]+"-"+dateTimeMap["day"]+" "+dateTimeMap["hour"]+":"+dateTimeMap["minute"]+":"+dateTimeMap["second"]+" "+dateTimeMap["dayPeriod"] + " ";
}
}
It would be great if the daemons xx.err.log would have the same timestamps like xx.wrapper.log
The text was updated successfully, but these errors were encountered: