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

using good with hapi.Pack.compose #208

Closed
csrl opened this issue Oct 11, 2014 · 1 comment · Fixed by #216
Closed

using good with hapi.Pack.compose #208

csrl opened this issue Oct 11, 2014 · 1 comment · Fixed by #216
Milestone

Comments

@csrl
Copy link

@csrl csrl commented Oct 11, 2014

Hello,

Previously I was able to load good as a plugin through Hapi.Pack.compose like so:

Hapi.Pack.compose({<snip>, plugins: {
  'good': [{
    options: {
      subscribers: {'console': ['ops', 'request', 'log', 'error']},
      opsInterval: 60000
    }
  }]
}});

Now it seems the approach is:

Hapi.Pack.compose({<snip>, plugins: {
  'good': [{
    options: {
      reporters: [{
        reporter: require('good').GoodConsole,
        args: [{events: {ops: '*', request: '*', log: '*', error:'*'}}],
      }],
      opsInterval: 60000
    }
  }]
}});

It is a nitpick, but it seems unfortunate that it is necessary to use a "require" here. It'd be nice to just provide the reporter module name instead. require('good/lib/reporter') also works, but that is even uglier.

Thanks.

@totherik

This comment has been minimized.

Copy link
Contributor

@totherik totherik commented Oct 13, 2014

This bit us, too. We were using shortstop so we were able to get around it easily by using the require handler if that helps you out at all (at least until this gets resolved).

@arb arb added this to the 3.1.0 milestone Oct 16, 2014
@arb arb mentioned this issue Oct 21, 2014
@geek geek closed this in #216 Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.