Julien-R44/pino-loki

[Feature Request] convertArrays should perform a shallow conversion instead of a deep conversion

Opened this issue · 1 comments

Loki's documentation is poor in this regard, but it actually supports arrays nested in an object:

logger.info(["hello", "world", 2]); // omitted
logger.info({ data: ["hello", "world", 2] }); // shows up

image

If the purpose of convertArrays is only to allow for ingest, I think it should only convert in cases where it would otherwise be omitted, i.e. top-level conversion. Currently it converts array in all levels:

image

Hey! Indeed, looks like a bug. Happy to accept a PR for the same
Thankss