Navigation Menu

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

Incoming Request Logging #359

Closed
arb opened this issue Jun 5, 2015 · 6 comments
Closed

Incoming Request Logging #359

arb opened this issue Jun 5, 2015 · 6 comments
Assignees
Labels
feature New functionality or improvement

Comments

@arb
Copy link
Contributor

arb commented Jun 5, 2015

Add something to listen for incoming requests that isn't an extension method. At present, there isn't a great way to get an "only once" kind of event from hapi because "request-internal" happens multiple times.

@arb arb added the feature New functionality or improvement label Jun 5, 2015
@davidbnk
Copy link

+1

@arb arb modified the milestone: 6.5.0 Sep 28, 2015
@arb arb modified the milestones: 6.5.0, 7.0.0 Nov 18, 2015
@arb arb modified the milestone: 7.0.0 Feb 29, 2016
@MichalZalecki
Copy link

MichalZalecki commented May 18, 2016

Logging requests was working well in 5.x now I cannot get any useful info.

@arb
Copy link
Contributor Author

arb commented May 18, 2016

It's hard to give you any help or advice without seeing your configuration and listing of versions you are using. If you're having problems, please open a new issue.

@MichalZalecki
Copy link

MichalZalecki commented May 18, 2016

@arb Sure.

This is an example, log from one of my apps

160518/205444.990, [response], http://localhost:3000: post /graphql {} 200 (99ms)
"good": "^6.6.0",
"good-console": "^5.3.1",
"hapi": "^13.2.2",
{
  register: require("good"),
  options:  {
    reporters: [{
      reporter: require("good-console"),
      events: { log: "*", response: "*" },
    }],
  },
},

I would like to be able to get same/similar log with

"good": "^7.0.0",
"good-console": "^6.1.1",
"hapi": "^13.3.0",
{
  register: require("good"),
  options: {
    ops: {
      interval: 1000,
    },
    reporters: {
      console: [{
        module: "good-console",
        args: [{ log: "*", response: "*" }],
      }],
    },
  },
},

No luck though. Sorry for not being more explicit.

Thanks!

@arb
Copy link
Contributor Author

arb commented May 18, 2016

Please be sure to read the documentation and look at the examples and also check out the release notes. Your console reporter pipeline doesn't end with a write stream. That's why you aren't seeing anything. You want to add "stdout".

If you have any other issues, please open a new issue; this issue is for adding a way to log the "request" event from hapi and not a troubleshooting issue. Thanks!

@hapijs hapijs deleted a comment from rajeshwarpatlolla Sep 21, 2019
@hapijs hapijs deleted a comment from rajeshwarpatlolla Sep 21, 2019
@hueniverse hueniverse self-assigned this Sep 21, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

5 participants
@hueniverse @davidbnk @arb @MichalZalecki and others