A console stream that logs structured fields to the console
npm install bunyan-structured-console-stream
const user = {username: 'Ray', age: 36 };
logger.debug({...user}, 'User {username}, is {age} years old');
`
Normally with back-end logging stores like Seq, the interpolation in this token format will occur on the server and not the client side. To enable us to have the interpoloation on the client, use this stream in your bunyan configuration.Usage with Bunyan
`
import { createConsoleStream } from 'bunyan-structured-console-stream';const options = {
name: 'LoggerName',
streams: [
{
type: 'raw',
stream: createConsoleStream(true),
level: "debug"
}
]
}
``