spring-cloud-config icon indicating copy to clipboard operation
spring-cloud-config copied to clipboard

Log a message when fetch is done, even if there are no updates?

Open marnee01 opened this issue 5 years ago • 7 comments

JGitEnvironmentRepository logs a message starting with "Fetched for remote" in its fetch method, but only when the fetch results reports there were updates.

Could you update to always log it, even if result.getTrackingRefUpdates().size() == 0?

Or, is there some other way I can tell by the logs (at level "info") when it has done a fetch? I don't see anything else being logged that would indicate this.

marnee01 avatar Oct 24 '19 21:10 marnee01

Want to submit a PR?

ryanjbaxter avatar Oct 28 '19 14:10 ryanjbaxter

I can't make the decision on whether or not it's a good idea. For us, it would be beneficial. Does anyone using config server have service instances that receive so much traffic that they would complain about the extra logging? If your team is okay with it, then I would proceed.

However, I can't do this now. Can you leave this open for a couple/few weeks? I will see if I can get to it within three weeks. Whether it's closed or not, I would just submit a pull request later and reference this.

marnee01 avatar Oct 30 '19 22:10 marnee01

@marnee01 By any chance, if you didn't get the time to work on it, could I take this issue?

ThomasVitale avatar May 17 '20 20:05 ThomasVitale

@ThomasVitale I have not worked on it, so sure you can take it.

marnee01 avatar May 18 '20 14:05 marnee01

@marnee01 Thanks

@ryanjbaxter Should the extra logging be added by default when result.getTrackingRefUpdates().size() == 0 or should it be configurable through a dedicated property?

ThomasVitale avatar May 25 '20 18:05 ThomasVitale

Hey @OlgaMaciaszek , I am Anbazhagan , a contributor to OpenForce 2022. I would like to work on this issue. How can i help with this ?

Anbazhagan04 avatar Mar 05 '22 11:03 Anbazhagan04

Hello, @Anbazhagan04 , this logging should be modified in order to log even if no updates were fetched. This comment has all the details. If you need any more help, please contact the mentors in the spring cloud channel in the OpenForce Discord.

OlgaMaciaszek avatar Mar 07 '22 11:03 OlgaMaciaszek