datalust/pino-seq

pino-seq does not log errors along with an object

Closed this issue · 5 comments

Since pino-seq does not have issues section I'm submitting this issue here. The project owner of pino-seq is @simihartstein.

Please see comments below:

import pino from 'pino';
import pinoToSeq from 'pino-seq';
const seqStream = pinoToSeq.createStream({
  serverUrl: 'http://localhost:5341',
});

const log = pino({ level: 'info'}, seqStream);
const err = new Error('Some error occurred.');

log.error(err); // works OK, but can't add additional meta data

log.error({ err }); // does not log any error info

log.error({ err, meta: 'aaa' }); // does not log any error info, only adds meta

// The only way I found to log error info with additional meta data is this:
log.error({ stack: err.stack, type: err.name, meta: 'aaa' }, err.message);

Note that the log.error({ err }) syntax is recommended by pino author but it doesn't work with pino-seq. This could be related to an issue with seq-logging that is used by pino-seq.

Thanks for raising this. We're working with the current maintainer to move this package forwards.

Transferred to the new datalust/pino-seq repository.

Fixed in #2 :)

This is still an issue in build 9.4.0

@SquareLi thanks for the note. The current package version is 1.2.0 so the build number you mention might be of Pino itself. Since this was resolved long ago, it's likely the details and causes of a similar issue now will be different - a new ticket with an example of what you're logging, what you get in Seq, and what is expected, is needed for us to track this down. Thanks!