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

doc: fix example #3028

Merged
merged 1 commit into from
Apr 22, 2021
Merged

doc: fix example #3028

merged 1 commit into from
Apr 22, 2021

Conversation

zekth
Copy link
Member

@zekth zekth commented Apr 22, 2021

Currently the examples show how to write a simple server but also leads to a double log because of this line :

this.log.info('Server listening at ' + address)

and this snippet:

fastify.listen(3000, (err, address) => {
  if (err) throw err
  fastify.log.info(`server listening on ${address}`) // This will be duplicated
})

In a sense it is good to show where to put logs when server starts but at the same time it will be strange as a first developer experience to see dupe log lines. I'm definitely not sure this is the best way to adress this problem but i think we should find a solution for this.

Checklist

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed.

@RafaelGSS RafaelGSS added the documentation Improvements or additions to documentation label Apr 22, 2021
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 28febdd into fastify:main Apr 22, 2021
@zekth zekth deleted the doc_example branch April 22, 2021 20:29
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants