-
Notifications
You must be signed in to change notification settings - Fork 1k
Add context.log to add event context to each log message
#321
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
Conversation
context.log to addcontext.log to add event context to each log message
I'm not crazy about how verbose every log comment will be because of this. One idea: update the serializers to include more/less context based on |
|
The tough part with logging is that, in production, you only need it when somethings gone wrong and you want to find out why. I've experienced that, and often I look through my webhook deliveries on the GH UI for:
I think that |
|
It also doesn't necessarily need to be wrapped in the With the values in bold (using chalk or something) |
* origin/master: fix: Move unhandled rejection listener to cli scripts (#339) chore: Move index.js into lib/ (#338) Add option to develop Probot on Glitch (#306) refactor: absorb github-app chore: Setup Appveyor (#334) docs: Replace examples with include from website (#327) # Conflicts: # lib/index.js
10e78d2 to
75c28e7
Compare
We don't currently have a lot of control over this. We're currently using https://github.com/thlorenz/bunyan-format, which we can make improvements to later.
|
* origin/master: Fix two 404s to the API docs (#344) Add `context.log` to add event context to each log message (#321) fix(package): update github to version 12.0.3 (#340) chore(packaging): Remove semantic-release from CI (#341) refactor: switch ejs for hbs fix: Move unhandled rejection listener to cli scripts (#339) chore: Move index.js into lib/ (#338) Add option to develop Probot on Glitch (#306) refactor: absorb github-app chore: Setup Appveyor (#334) docs: Replace examples with include from website (#327)
cc #320
This PR adds
context.log, which will include information about the context in each log message.or with
LOG_LEVEL=json{"name":"Probot","hostname":"Brandons-MacBook-Pro-3.local","pid":96993,"event":{"id":"afdcb370-c57d-11e7-9b26-0f31120e45b8","event":"issue_comment","action":"created","repository":"robotland/test","installation":13055},"level":20,"msg":"Comment created","time":"2017-11-09T18:42:07.312Z","v":0}