Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for pino transports? #1049

Open
yorch opened this issue Mar 10, 2023 · 3 comments
Open

Support for pino transports? #1049

yorch opened this issue Mar 10, 2023 · 3 comments

Comments

@yorch
Copy link

yorch commented Mar 10, 2023

Pino is a logger that has the concept of transports, that are started in a worker thread, so the transports (which can be other packages) are not directly import by the code, but just referenced by name. For instance:

const pino = require('pino')
const transport = pino.transport({
  target: 'pino-pretty',
  options: { destination: 1 } // use 2 for stderr
})
pino(transport)

Being pino-pretty another NPM package.

More info: https://github.com/pinojs/pino/blob/master/docs/transports.md#transports

After compiling a project and trying to run the compiled version, Pino cannot obviously find the used transports (ie: pino-pretty).

Any idea on how to support this or work around it?

Thanks

@styfle
Copy link
Member

styfle commented Mar 10, 2023

There's a similar issue #794 that suggested --asset-builds flag

@yorch
Copy link
Author

yorch commented Mar 27, 2023

@styfle did it work for you? I tried it before creating the issue but couldn't make it work

@ghost
Copy link

ghost commented Apr 19, 2023

--asset-builds didnt work for me either with pino, so i just it as externals while playing around.

It also doesn't show up in the help text at all as per the readme. I went back through the last few releases and it has never showed up in in the help text even I think in the one in which it was introduced, so it's probably more of a UI oversight in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants