Skip to content

Log method pre string notation#1919

Merged
geek merged 1 commit intomasterfrom
issue/1917
Sep 8, 2014
Merged

Log method pre string notation#1919
geek merged 1 commit intomasterfrom
issue/1917

Conversation

@hueniverse
Copy link
Copy Markdown
Contributor

Closes #1917

@hueniverse hueniverse added feature New functionality or improvement dependency Update module dependency labels Sep 8, 2014
@hueniverse hueniverse added this to the 6.8.0 milestone Sep 8, 2014
geek added a commit that referenced this pull request Sep 8, 2014
Log method pre string notation
@geek geek merged commit 56fa652 into master Sep 8, 2014
@geek geek deleted the issue/1917 branch September 8, 2014 19:38
@briandela
Copy link
Copy Markdown
Contributor

@hueniverse Could this change have introduced a breaking change in 6.8.0? When I upgrade to Hapi 6.8.0 from 6.7.1 I see that server methods are behaving differently, and ones I have added via server.method('funcName', func) (e.g. server.method('removeTrailingSlash', removeTrailingSlash);) without specifying options seem to be getting a cache property and not being executed correct.

In 6.7.1 if I were to console.log(server.methods) in node-inspector I get:

{ fileNameWithoutExt: [Function],
  removeTrailingSlash: [Function],
  getMarketData: { [Function] cache: { drop: [Function] } },
  setPreferredMarket: [Function] }

In 6.8.0 I get:

{ fileNameWithoutExt: { [Function] cache: { drop: [Function] } },
  removeTrailingSlash: { [Function] cache: { drop: [Function] } },
  getMarketData: { [Function] cache: { drop: [Function] } },
  setPreferredMarket: { [Function] cache: { drop: [Function] } } }

When calling server.methods.removeTrailingSlash in 6.7.1 it behaves correctly, but in 6.8.0 it always returns undefined and when I step into the code, my removeTrailingSlash method is never called (same behaviour for the other methods which did not have an explicit options method passed when adding them to the server).

Any ideas?

@hueniverse
Copy link
Copy Markdown
Contributor Author

This is a bug. #1922

@briandela
Copy link
Copy Markdown
Contributor

Thanks!

@lock
Copy link
Copy Markdown

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

dependency Update module dependency feature New functionality or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log cache info when using server method short hand calls

3 participants