-
-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Consider this script:
// demo-logger.ts
import { Logger } from 'tslog';
const logger = new Logger();
const obj = { name: 'John Doe', balance: 100n };
logger.info(obj);With the default settings, it will output:
node ./demo-logger.ts
2026-01-22 15:32:55.411 INFO demo-logger.ts:6 {
name: 'John Doe',
balance:
{
}
}
Which of course cause the 100n value to be lost.
I am wondering what's the best approach:
- Is the empty object the intended behavior?
- If not, what should be the intended format? 100n,
'100n'. something else? - Is there any for me to define a custom formatter for bigint?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels