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 file URLs when configuring multiple transports #1961

Merged
merged 1 commit into from
May 7, 2024

Conversation

haines
Copy link
Contributor

@haines haines commented Apr 30, 2024

pino currently supports file URLs in single transports

pino.transport({ target: "file:///path/to/transport.js" });

but in multiple transports it does not:

pino.transport({ targets: [{ target: "file:///path/to/transport.js" }] });

throws

{
  code: "ERR_INVALID_URL",
  input: "file://file:///path/to/transport.js",
}

This PR adds a check for the presence of the file:// prefix before prepending it to the target.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 3243b71 into pinojs:main May 7, 2024
2 checks passed
@haines haines deleted the multiple-transports-file-url-target branch May 7, 2024 17:58
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

Successfully merging this pull request may close these issues.

None yet

2 participants