fix: Log filename add milliseconds
This commit is contained in:
1 parent
4b80e73202
commit
bc8fd37a2e
1 file changed
+2
-1
@@ -21,7 +21,8 @@ function getFormattedTimestamp() {
|
|||||||
const hours = now.getHours().toString().padStart(2, '0');
|
const hours = now.getHours().toString().padStart(2, '0');
|
||||||
const minutes = now.getMinutes().toString().padStart(2, '0');
|
const minutes = now.getMinutes().toString().padStart(2, '0');
|
||||||
const seconds = now.getSeconds().toString().padStart(2, '0');
|
const seconds = now.getSeconds().toString().padStart(2, '0');
|
||||||
return `${year}-${month}-${day}_${hours}-${minutes}-${seconds}`;
|
const milliseconds = now.getMilliseconds().toString().padStart(3, '0');
|
||||||
|
return `${year}-${month}-${day}_${hours}-${minutes}-${seconds}.${milliseconds}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const filename = `${getFormattedTimestamp()}.log`;
|
const filename = `${getFormattedTimestamp()}.log`;
|
||||||
|
|||||||
Reference in new issue
Block a user