Skip to content

Commit c1019ee

Browse files
committed
feat: add ISO timestamps to console logs in loop mode
1 parent e6068b0 commit c1019ee

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ async function main() {
9090

9191
process.env.EVOLVE_LOOP = 'true';
9292
process.env.EVOLVE_BRIDGE = 'false';
93+
94+
const originalLog = console.log;
95+
const originalWarn = console.warn;
96+
const originalError = console.error;
97+
function ts() { return '[' + new Date().toISOString() + ']'; }
98+
console.log = function() { originalLog.apply(console, [ts(), ...arguments]); };
99+
console.warn = function() { originalWarn.apply(console, [ts(), ...arguments]); };
100+
console.error = function() { originalError.apply(console, [ts(), ...arguments]); };
101+
93102
console.log('Loop mode enabled (internal daemon).');
94103

95104
const { getEvolutionDir } = require('./src/gep/paths');

0 commit comments

Comments
 (0)