Displaying all the configuration in the log with info logger level
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
PRs welcome
I'd recommend displaying the source names on info and the properties on debug
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.
@siddhantsorann assigned to you.
@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.
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?
yes, the idea is having info be short and debug have everything that is there now.
@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.
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.
@Siddhantsorann From my side, it looks good. But I have one query, do we really need debug for property values?