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

Query and streaming support #130

Merged
merged 72 commits into from May 31, 2012
Merged

Query and streaming support #130

merged 72 commits into from May 31, 2012

Conversation

chjj
Copy link
Member

@chjj chjj commented May 4, 2012

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 the meta 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 and logger.query methods only consider using a transport if it has these methods to begin with.

indexzero and others added 30 commits April 23, 2012 11:24
Conflicts:

	lib/winston.js
	lib/winston/transports/transport.js
chjj and others added 29 commits May 10, 2012 10:49
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.
@chjj chjj merged commit 8ddbcff into master May 31, 2012
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