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

Do not overwrite log files by default #307

Merged
merged 5 commits into from
May 22, 2020
Merged

Conversation

Didainius
Copy link
Collaborator

By default go-vcloud-director always overwrites log files. This causes problems in some libraries if they instantiate go-vcloud-director multiple times during single operations run. One example of that being Terraform where it runs plugin 5 times during one terraform apply command and part of the logs are instantly overwritten.

This PR changes default to "append" instead of overwriting and introduces environment variable GOVCD_LOG_OVERWRITE to allow enabling old behavior.

@Didainius Didainius marked this pull request as ready for review May 21, 2020 14:13
@Didainius Didainius changed the title Do not overwrite log files Do not overwrite log files by default May 21, 2020
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Copy link
Contributor

@dataclouder dataclouder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good improvement!

Copy link
Contributor

@vbauzys vbauzys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at last :)

@Didainius Didainius merged commit d260d00 into vmware:master May 22, 2020
@Didainius Didainius deleted the fix_logging branch May 22, 2020 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants