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
Query and streaming support #130
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Conflicts: lib/winston.js lib/winston/transports/transport.js
…e error emission.
This helps with testing a lot. logger.log('info', 'hello world', {}, function(err) { doOtherStuff(); }); It is now possible to make the assumption that the callback will only be executed once a response is received from the server.
…y in File transport.
…t in transport test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will add
.stream
and.query
support to winston.One problem with the additions to the transports in general was the inconsistencies between them. Some transports had json enabled by default, some did not. Some had timestamps enabled by default, others did not. Both of these features are pretty essential if the user ever wants to query logs. There was also some dissonance between property names, e.g.
message
vs.msg
. In some cases, the log object was being mixed-in with themeta
object before logging, in other cases it wasn't.There's also the question of the core transports. winston-nssocket and winston-redis were moved here to ease development, but they feel kind of natural as core transports. winston-redis needed some work in areas, and it depended on a much older version of winston. "winston-http" was also added. Nothing like it existed prior. Both winston-nssocket and winston-http will be useful for communication with winstond.
The main thing lacking right now is the loggly transport. Loggly has been given stream/query support, but it is not as well tested as the other transports.
These changes should be compatible with existing winston transports. The
logger.stream
andlogger.query
methods only consider using a transport if it has these methods to begin with.