chore(logs): improve log messages#413
chore(logs): improve log messages#413martinm82 wants to merge 7 commits intogithub:main-enterprisefrom
Conversation
|
@martinm82 I think it looks good, but what about duplicate keys for Maybe a good thing could be to use different property names for the context? I interpret the It makes sense to have a logger context/name that matches the source code filename. Also adding But most valueable to me when doing log diving is to have a trace id around. In the context of Safe Settings it would be really great to have the github delivery id on every log record: Sometimes you have to debug timeouts in the webhook delivery log and you wonder what actually happened in the Safe Settings end. Did the request get processed and/or did the lambda start? Maybe the request took too long time to complete? The delivery ID could be populated in a "root logger" in the event handler / index.js. Each plugin could create a child logger from that (passed via the constructor) and further on utility modules like mergedeep can create their child loggers from the plugin loggers. What do you think? |
d900367 to
0462191
Compare
Indeed, haven't thought about the duplicates. Will extend a bit the implementation and incorporate this.
With central logging systems (e.g. DataSet) one can use queries like
I agree but maybe we could tackle this in a separate PR, WDYT? |
| } | ||
|
|
||
| validate (section, baseConfig, overrideConfig) { | ||
| validate (repoName, section, baseConfig, overrideConfig) { |
There was a problem hiding this comment.
This seems unused to me. Maybe I'm missing something here :)

While debugging the app I have been struggling a lot with figuring out from where the logs were coming from. We are using a central logging system (DataSet) where logs can be easily queried and filtered.
For that purpose I have started to use the
childmethod of thepinologger used by the Probot app to add additional attributes in the log messages.Let me know what you think about this.