Stop pyvcloud creating an empty log file called 'vcd_sdk.log'#766
Stop pyvcloud creating an empty log file called 'vcd_sdk.log'#766andrew-lee-1089 wants to merge 1 commit intovmware-archive:masterfrom
Conversation
Remove the need to call "Get_logger" which inadvertently creates an empty `vcd_sdk.log` file in your home directory, which seems unuseful for a single log across the whole project.
rocknes
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @andrew-lee-metaswitch)
pyvcloud/vcd/vapp.py, line 1605 at r1 (raw file):
no_of_vm_upgraded += 1 except OperationNotSupportedException: raise OperationNotSupportedException(
Under normal circumstance raising an exception here would make perfect sense. However, by changing the current behavior (no exception -> raising exception) we risk breaking existing users of this method.
We will merge this in the next major release of pyvcloud.
|
If I changed it from logger.error to just print - would that be acceptable / not-deemed a non-breaking change? |
|
@rocknes any update on this? I'd like to get this released if possible. Thanks! |
|
@rocknes , same here. Could we sync path log from client initialzation to this or optional it by path? |
Remove the need to call "Get_logger" which inadvertently creates an empty
vcd_sdk.logfile 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