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
Update to new interface of Good and es6 #67
Conversation
@@ -2,5 +2,5 @@ sudo: false | |||
language: node_js | |||
|
|||
node_js: | |||
- 0.10 | |||
- 4 | |||
- 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be "4" and "node"
|
||
/*eslint-disable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to this logic? We need this still somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tags
isn't used on all events. Just in events: response
(but is in event.logs[i].tags
) log
and request
event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at the old code, I normalized this so that every event did include tags and the first tag was always the eventName
.
|
||
const Joi = require('joi'); | ||
|
||
exports.reporter = Joi.object().keys({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using joi here is kind of overkill. Just use the default values logic that was there before.
@arb can review? |
@@ -10,33 +10,23 @@ Lead Maintainer: [Adam Bretz](https://github.com/arb) | |||
|
|||
`good-console` is a [good](https://github.com/hapijs/good) reporter implementation to write [hapi](http://hapijs.com/) server events to the console. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to read something about a transform stream into formatted strings.
any other tips? |
if (typeof event.responsePayload === 'object' && event.responsePayload) { | ||
responsePayload = 'response payload: ' + SafeStringify(event.responsePayload); | ||
config = config || {}; | ||
this.settings = Hoek.applyToDefaults(internals.defaults, config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this._settings
since we want to keep people out.
I update de README.md with the tags information on the example of outputs. |
@arb some news? |
@thebergamo I haven't forgotten; I will get to it when I can. |
ok, sorry for my impatience :( |
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
Well, this is a refactoring inspired for the issues #63 #64 and #65.
@arb can review?
NOTE: Well, I started this refactoring before the PR #66 are pushed, I have some delay to understand the new interface of Good and deal with Stream was a good xp.