Creates a Morgan-compatible stream that writes to a Pino logger
Morgan appends newlines to messages, which this stream automatically strips.
Pino logger instance
Log level to use for HTTP logs (default: 'info')
Morgan-compatible stream object
const httpLogger = createLogger({ name: 'http' })const stream = createMorganStream(httpLogger)app.use(morgan('combined', { stream })) Copy
const httpLogger = createLogger({ name: 'http' })const stream = createMorganStream(httpLogger)app.use(morgan('combined', { stream }))
Creates a Morgan-compatible stream that writes to a Pino logger
Morgan appends newlines to messages, which this stream automatically strips.