-
Notifications
You must be signed in to change notification settings - Fork 275
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
fix(log): set info log level by default for the entire application #4451
Conversation
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
CI performance tests
|
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs need to updated:
https://www.apollographql.com/docs/router/configuration/telemetry/exporters/logging/overview/#log-level
Also @garypen do you agree with the overall change?
@BrynCooke I think the documentation is still accurate, I didn't change the behavior. I just fixed it |
The motivation of the last adjustment to APOLLO_ROUTER_LOG was to limit its scope to "just router stuff". We restored RUST_LOG functionality to what a rust developer would expect (i.e.: you can do whatever is supported by the RUST_LOG filtering). I think there was an oversight in that fix which mean that APOLLO_ROUTER_LOG didn't apply to plugins, so if you wanted to see logs from plugins you had to use RUST_LOG. If this fix is addressing that shortcoming, i.e.: plugins observe the same logging behaviour as the main router, then that is correct. It looks to me like it might also change the value for non-plugin crates, e.g.: |
That's the goal yes.
I don't think it will change the value for non plugin crate like |
…pollographql#4451) By default the log level of the application if `RUST_LOG` is not set is `info` and if you provide `--log` or `APOLLO_RUST_LOG` value then it overrides the default `info` log level with `apollo_router=...` because it only impacts the `apollo_router` crate, not external custom plugin and so one. By doing this fix, by default if you have a custom plugin with info logs or metrics you won't have to enforce `RUST_LOG=info` everytime, it will work as expected. > Note: it doesn't impact the behavior of `RUST_LOG` if you set it. --------- Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
By default the log level of the application if
RUST_LOG
is not set isinfo
and if you provide--log
orAPOLLO_RUST_LOG
value then it overrides the defaultinfo
log level withapollo_router=...
because it only impacts theapollo_router
crate, not external custom plugin and so one.By doing this fix, by default if you have a custom plugin with info logs or metrics you won't have to enforce
RUST_LOG=info
everytime, it will work as expected.Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩