I use Winston for my backend logging I cannot log the object without using JSON.stringify which is annoying
JSON.stringify
logger.debug(`Register ${JSON.stringify(
You can use format.splat() in your logger config:
format.splat()
const logger = createLogger({ format: combine( ... format.splat(), // <-- ... ), ... });
...and log object using string interpolation:
let myObj = { /* ... */ }; logger.info('This message will include a complete object: %O', myObj);