vmware-archive / pyvcloud

Python SDK for VMware vCloud Director
https://vmware.github.io/pyvcloud
Other
170 stars 190 forks source link

Stop pyvcloud creating an empty log file called 'vcd_sdk.log' #766

Open andrew-lee-1089 opened 3 years ago

andrew-lee-1089 commented 3 years ago

Remove the need to call "Get_logger" which inadvertently creates an empty vcd_sdk.log file in your current working directory, which seems un-useful for a single log across the whole project.

pyvcloud is great -but there is no logging, I think that is basically fine so long as we are consistent with that fact, implementing logging for one log feels like the worst of both worlds, and is leaving us with an empty file in our current working directory, with no way to configure this log file name or location. I rejected the idea of doing anything fancier here, because sorting out logging in this project felt too big a task for a Tuesday morning.

I've not tested.

Can someone please review?


This change is Reviewable

andrew-lee-1089 commented 3 years ago

If I changed it from logger.error to just print - would that be acceptable / not-deemed a non-breaking change?

andrew-lee-1089 commented 2 years ago

@rocknes any update on this? I'd like to get this released if possible.

Thanks!

volehuy1998 commented 1 year ago

@rocknes , same here. Could we sync path log from client initialzation to this or optional it by path? def _get_default_logger(self, file_name="vcd_pysdk.log",