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

Log guidelines improvements #10

Merged
merged 16 commits into from
Jun 8, 2020
Merged

Conversation

fredmaggiowski
Copy link
Member

Checklist

  • your branch will not cause merge conflict with master
  • run npm test
  • tests are included
  • the documentation is updated or intregrated accordingly with your changes
  • the code will follow the lint rules and style of the project
  • you are not committing extraneous files or sensible data

@fredmaggiowski fredmaggiowski mentioned this pull request May 19, 2020
6 tasks
@fredmaggiowski fredmaggiowski self-assigned this May 19, 2020
@fredmaggiowski fredmaggiowski added the enhancement New feature or request label May 19, 2020
@fredmaggiowski fredmaggiowski marked this pull request as draft May 21, 2020 09:28
@fredmaggiowski fredmaggiowski marked this pull request as ready for review May 22, 2020 08:37
example/package.json Show resolved Hide resolved
lib/custom-logger.js Outdated Show resolved Hide resolved
lib/custom-logger.js Outdated Show resolved Hide resolved
lib/custom-logger.js Outdated Show resolved Hide resolved
@fredmaggiowski
Copy link
Member Author

fredmaggiowski commented May 27, 2020

Log samples

{"level":30,"time":57521674.786215,"pid":42380,"hostname":"mycomputer","msg":"Server listening at http://0.0.0.0:61625","v":1}
{"level":30,"time":57521677.424422,"pid":42380,"hostname":"mycomputer","reqId":1,"http":{"request":{"method":"GET"}},"url":{"full":"/"},"userAgent":{},"host":{"ip":"127.0.0.1"},"msg":"incoming request","v":1}
{"level":30,"time":57521677.863477,"pid":42380,"hostname":"mycomputer","reqId":1,"http":{"response":{"statusCode":200,"body":{}}},"responseTime":0.4573419988155365,"msg":"request completed","v":1}

package.json Outdated Show resolved Hide resolved
const importEnv = require('./import-env')
const { exportFastifyOptions, exportServiceOptions } = require('./options-extractors')
const statusRoutes = require('./status-routes')
const swaggerDefinition = require('./swagger-definition')
const WAIT_BEFORE_SERVER_CLOSE_SEC = parseInt(process.env.WAIT_BEFORE_SERVER_CLOSE_SEC) || 10

const lc39Options = {
disableRequestLogging: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

We lost an error log with this.

Copy link
Member Author

@fredmaggiowski fredmaggiowski Jun 5, 2020

Choose a reason for hiding this comment

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

@fredmaggiowski fredmaggiowski merged commit 75069d1 into master Jun 8, 2020
@fredmaggiowski fredmaggiowski deleted the log-guidelines-improvements branch June 8, 2020 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants