Skip to content

Log plugin name and attribute errors to plugins#3194

Merged
pepeiborra merged 9 commits into
masterfrom
log-plugin-name
Sep 21, 2022
Merged

Log plugin name and attribute errors to plugins#3194
pepeiborra merged 9 commits into
masterfrom
log-plugin-name

Conversation

@pepeiborra

@pepeiborra pepeiborra commented Sep 18, 2022

Copy link
Copy Markdown
Collaborator

Here's another PR to make our logs slightly less useful: include the plugin name in plugin log messages and handler error messages. While there I also lowered the priority of some plugin log messages.

The end result can be seen in the log lines below.

2022-09-18T17:03:12.866214Z | Warning | retrie: InternalError: typecheck
2022-09-18T17:03:12.867001Z | Warning | retrie: InternalError: typecheck
2022-09-18T17:03:12.867141Z | Warning | retrie: InternalError: typecheck
2022-09-18T17:03:12.867250Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.867558Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.868251Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.868727Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.869204Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.875347Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.875602Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.876245Z | Warning | class: InternalError: Unable to typecheck
[Warn  - 7:03:12 PM] class: InternalError: Unable to typecheck

Logs are still way too noisy as we log a warning when a plugin handler returns a ResponseError. I suspect that some plugins are generating ResponseErrors for things that are not really errors.

@pepeiborra
pepeiborra force-pushed the log-plugin-name branch 4 times, most recently from 2e1ab65 to 6975503 Compare September 18, 2022 14:18
@pepeiborra pepeiborra changed the title Log plugin name Log plugin name and attribute errors to plugins Sep 18, 2022
@pepeiborra
pepeiborra marked this pull request as ready for review September 20, 2022 05:25
@drsooch

drsooch commented Sep 20, 2022

Copy link
Copy Markdown
Collaborator

Logs are still way too noisy as we log a warning when a plugin handler returns a ResponseError. I suspect that some plugins are generating ResponseErrors for things that are not really errors.

Agreed when I originally made the change I didn't really expect to see some of the errors (like failing to typecheck or get a parsed module).

I think sending back a ResponseError should more be in line with a logic bug or an unexpected code path. (Some of my plugins are guilty of sending a ResponseError when it probably shouldn't.)

@drsooch drsooch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@pepeiborra
pepeiborra enabled auto-merge (squash) September 21, 2022 15:56
@pepeiborra
pepeiborra merged commit dca5cc3 into master Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants