Fix imports

This commit is contained in:
James Shiffer
2023-10-08 19:20:00 -07:00
parent 49360a7c5b
commit 393bc4f8ca
5 changed files with 28 additions and 21 deletions

22
logging.ts Normal file
View File

@@ -0,0 +1,22 @@
/**
* logging.ts
* Standardized logging helper functions
*/
function curDateStr() {
return new Date().toJSON().replace('T', ' ').replace('Z', '');
}
function logInfo(...data) {
console.log(`[${curDateStr()}] ${data.join(' ')}`);
}
function logWarn(...data) {
console.warn(`[${curDateStr()}] ${data.join(' ')}`);
}
function logError(...data) {
console.error(`[${curDateStr()}] ${data.join(' ')}`);
}
export { logInfo, logWarn, logError };