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

fix: stop changing logs if flusher is not set #5676

Merged
merged 2 commits into from
May 27, 2024

Conversation

eduardoboucas
Copy link
Member

Summary

If outputFlusher isn't set, stop changing the logs reference that is sent to the logic that calls plugins.

This shouldn't make a difference, but trying to be super defensive about this code path.

@eduardoboucas eduardoboucas requested review from a team as code owners May 27, 2024 17:11
Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@@ -190,7 +190,7 @@ export const getSystemLogger = function (
return (...args) => fileDescriptor.write(`${reduceLogLines(args)}\n`)
}

export const addOutputGate = (logs: Logs, outputFlusher: OutputFlusher): Logs => {
export const addOutputFlusher = (logs: Logs, outputFlusher: OutputFlusher): Logs => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Just renaming the method here to be consistent with the naming we ended up choosing. No functional change.

@eduardoboucas eduardoboucas enabled auto-merge (squash) May 27, 2024 18:23
@eduardoboucas eduardoboucas merged commit 1adebca into main May 27, 2024
37 checks passed
@eduardoboucas eduardoboucas deleted the fix/conditional-flusher branch May 27, 2024 18:27
This was referenced May 27, 2024
This was referenced Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants