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

Displaying all the configuration in the log with info logger level #949

Open
muqtharali opened this issue May 4, 2021 · 10 comments · May be fixed by #966
Open

Displaying all the configuration in the log with info logger level #949

muqtharali opened this issue May 4, 2021 · 10 comments · May be fixed by #966

Comments

@muqtharali
Copy link

In org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration class, displaying all the properties read from config server using the below log statement. I think we can stop displaying all the properties read from configuration file or spring cloud config server which will get displayed in Kibana or Grafana dashoboard.

At least we can change the logger level to debug so that in the production logs, we don't see all the values.

Statement
logger.info("Located property source: " + sourceList);

Jar: spring-cloud-context-2.2.2.RELEASE.jar
Class: org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration

@spencergibb
Copy link
Member

PRs welcome

@spencergibb
Copy link
Member

I'd recommend displaying the source names on info and the properties on debug

@siddhantsorann
Copy link

siddhantsorann commented Jun 7, 2021

Hey, @spencergibb @muqtharali I'd like to help out with this issue if possible. I've contributed to spring-cloud-dataflow and was looking at some other projects to contribute to when I came across this one.

@spencergibb
Copy link
Member

@siddhantsorann assigned to you.

@siddhantsorann
Copy link

@spencergibb Since I'm new to this project, could you give me a quick idea of what's to be done? I can see only one log line in this class.

@siddhantsorann
Copy link

We can have a log line to stream the source list and print all property names and a debug one to print the source as well? Does that work?

@spencergibb
Copy link
Member

yes, the idea is having info be short and debug have everything that is there now.

@muqtharali
Copy link
Author

@spencergibb @siddhantsorann As per understanding, we can remove the below log statement
logger.info("Located property source: " + sourceList);
Also add the info statement for property name and if required add the debug statement for property value.

@siddhantsorann
Copy link

Thanks for the info @muqtharali & @spencergibb.
From what I could understand I have created the above Pull Request. Let me know if it's okay.

@muqtharali
Copy link
Author

muqtharali commented Jun 27, 2021

@siddhantsorann From my side, it looks good.
But I have one query, do we really need debug for property values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants