function log(lg) {
const argName = Object.keys({ ...lg }).shift();
console.info(`${argName}: %c${lg[argName]}`, 'color:#3EC5FF');
}
function getFormattedDate() {
const date = new Date();
const str =
date.getFullYear() +
'-' +
(date.getMonth() + 1) +
'-' +
date.getDate() +
' ' +
date.getHours() +
':' +
date.getMinutes() +
':' +
date.getSeconds() +
':' +
date.getMilliseconds();
return str;
}
console.info(`%c-----> ${getFormattedDate()}`, 'color:green');
log({ activeLookbackId });
log({ highlightedLookbackIds });
log({ selector });
Last active
August 18, 2021 22:51
-
-
Save rpivo/b4b968edbe513d965e1449c737a2559f to your computer and use it in GitHub Desktop.
JavaScript Logger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment