Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit ca9f8d3

Browse files
committed
feat(core): local log support time log
1 parent c3324ab commit ca9f8d3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/framework-core/src/logger

packages/framework-core/src/logger/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ export default function getLogger(level?: string) {
7474
format: format.printf((info) => {
7575
const splat = info[Symbol.for('splat') as any];
7676
return (
77-
`${new Date()} CloudBase Framework::${info.level} ${
77+
`${new Date()} ${(
78+
(new Date().valueOf() - startTime.valueOf()) /
79+
1000
80+
).toFixed(1)} CloudBase Framework::${info.level} ${
7881
info.message
7982
}` + (splat ? ` ${splat.map(inspect).join(' ')} ` : '')
8083
);

0 commit comments

Comments
 (0)