fixed bugs
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
'server'
|
||||
const originalLog = console.log
|
||||
let _custom_console_log_injected = false
|
||||
if (!_custom_console_log_injected) {
|
||||
_custom_console_log_injected = true
|
||||
const originalLog = console.log
|
||||
|
||||
console.log = (message?: any, ...optionalParams: any[]) => {
|
||||
const now = new Date()
|
||||
const timestamp = now.toTimeString().split(' ')[0] // hh:mm:ss
|
||||
originalLog(`[${timestamp}] ${message}`, ...optionalParams)
|
||||
function customLog(message?: any, ...optionalParams: any[]) {
|
||||
const now = new Date()
|
||||
const timestamp = now.toTimeString().split(' ')[0] // hh:mm:ss
|
||||
originalLog(`[${timestamp}] ${message}`, ...optionalParams, ':3')
|
||||
}
|
||||
|
||||
console.log = customLog
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user