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

Check log.length when evaluating "legacyness" of transports #1340

Merged
merged 2 commits into from
May 31, 2018

Conversation

indexzero
Copy link
Member

In winston@3 this code in le_node would not result in the LogentriesTransport being wrapped in a LegacyTransportStream because winston.Transport will be require('winston-transport') and not require('winston-compat').Transport as we expect.

To work around this we now also check the function length of the log function to ensure a length of two. This is not a perfect check, but it should handle the 80% case.

Related: #1280, winstonjs/winston-transport#23

@indexzero indexzero merged commit 0be2362 into master May 31, 2018
@indexzero indexzero deleted the check-legacy-length branch May 31, 2018 14:11
@indexzero indexzero mentioned this pull request May 31, 2018
Mizumaki pushed a commit to Mizumaki/winston that referenced this pull request Jun 11, 2020
…s#1340)

* [test] Add failing test for peerDependency inheritance concerns.
* [fix test] Ensure that inheritance side-effects are properly caught when attempting to wrap in a LegacyTransportStream.
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.

2 participants