mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
These are now stable but to allow for graceful upgrading we still export unstable versions. The unstable version includes a once-warning that indicates you should upgrade to the stable name.
13 lines
294 B
JavaScript
13 lines
294 B
JavaScript
const originalLog = console.log.bind(console)
|
|
|
|
console.log = (...args) => {
|
|
new Date()
|
|
Math.random()
|
|
if (typeof args[0] === 'string') {
|
|
const firstArg = '[<timestamp>] ' + args[0]
|
|
originalLog(firstArg, ...args.slice(1))
|
|
} else {
|
|
originalLog('[<timestamp>] ', ...args)
|
|
}
|
|
}
|