-
Notifications
You must be signed in to change notification settings - Fork 29
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
Q: Any plan to migrato to v7+ transport? #33
Comments
@rodmoreno why would you assume there is a permanent plain to stick old legacy version that you even ask such a question? aside, I planned to submit a PR once #34 gets merged and I have time to play with this. the API seems very simple. |
Does pino 7.x support 6.x transports? or they are mutually exclusive? |
The |
I've done local testing, and seems 0.11 can work with pino 7.x. how to outline this better in this project, in readme? as pino not even included in dependencies, i.e to be installed via peerDependencies? |
If you use peerDependencies, not that there is different behaviour depending on the version of NPM. I came across that when upgrading my eslint config to the latest airbnb. With that said, peerDependencies sounds like what you would want to use for 'plugins', as they refer to it in the For some inspiration, you can see how they communicate dealing with peerDependencies here: https://www.npmjs.com/package/eslint-config-airbnb |
@glensc Does it really work with Pino 7? import pino from "pino"
async function main() {
const transport = pino.transport({
targets: [
{
target: "pino-sentry",
options: {
dsn: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
level: "error"
}
],
})
const logger = pino(
transport
)
logger.error('test')
}
main()
.catch(async e => {
console.error(e)
})
|
@meotimdihia I'm not using v7 api, then it works the code is part of other framework, so some bits may be off import { createWriteStream as createSentryStream } from "pino-sentry/dist/transport";
import { Level, Logger as BaseLogger, pino } from "pino";
const streams = [];
const sentryStream = createSentryStream(sentryOptions);
streams.push({
stream: sentryStream as any,
level: (options.levels?.sentry || "error") as Level,
name: "sentry",
});
const logger = pino(
{
level,
},
pino.multistream(streams),
); See also this discussion: |
The same error is happening with the code: (node.js 14) import pino from "pino"
import { createWriteStream as createSentryStream } from "pino-sentry/dist/transport"
const streams = []
const sentryStream = createSentryStream({
dsn: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
})
streams.push({
stream: sentryStream,
})
const logger = pino(
{
level: 'debug'
},
pino.multistream(streams)
)
logger.error('test') Referrer: pinojs/pino#1383 (comment) |
@meotimdihia the exact code (after fixing the unterminated dsn string) produces no output for me, so no error. your previous code I get "the worker has exited" error
node v14.19.1, pino@7.8.0, pino-sentry@0.11.0, pino-multi-stream@6.0.0 |
perhaps the node version is relevant? |
@aandrewww perhaps close this one (and lock), as it's mixed content and therefore confusing for the reader. it started as a question, but then some user hijacked the issue with their bug report instead of creating their own issue and then disappeared as well. |
We should be careful here. This might interact even worse with propagating the Sentry scope. |
@glensc @segevfiner agree with you close |
Recently I read about new v7+ transports and I would like to know if you have any plan to support this new architecture?
The text was updated successfully, but these errors were encountered: