better logging
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
* Quote & Invoice System - Main Entry Point
|
||||
* Modularized Backend
|
||||
*/
|
||||
// ── Global timestamp logger – must be first line before any require ──
|
||||
const _ts = () => new Date().toISOString().replace('T', ' ').substring(0, 19);
|
||||
const _origLog = console.log.bind(console);
|
||||
const _origWarn = console.warn.bind(console);
|
||||
const _origError = console.error.bind(console);
|
||||
console.log = (...a) => _origLog(`[${_ts()}]`, ...a);
|
||||
console.warn = (...a) => _origWarn(`[${_ts()}]`, ...a);
|
||||
console.error = (...a) => _origError(`[${_ts()}]`, ...a);
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const puppeteer = require('puppeteer');
|
||||
|
||||
Reference in New Issue
Block a user