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

Changing MM logging to favor debug over info #477

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

chrisst
Copy link
Contributor

@chrisst chrisst commented Sep 19, 2018

The INFO logs are getting filled with what looks like debug level information.
When compiling 1 product for 1 provider there are 16k INFO statements and zero
DEBUG level logs. This makes it difficult to show anything important in the
standard logging without escalating to WARN.

This change will move most of the output to debug level and set the default
logging level to INFO. The -d flag will still show all 16K lines of output but
at INFO there will only be a message for what is getting generated and what is
going to be excluded.

This will require a bit of a paradigm shift for people to start using debug
going forward where info was previously used.


[all]

[terraform]

[puppet]

[puppet-bigquery]

[puppet-compute]

[puppet-container]

[puppet-dns]

[puppet-logging]

[puppet-pubsub]

[puppet-resourcemanager]

[puppet-sql]

[puppet-storage]

[chef]

[chef-compute]

[chef-container]

[chef-dns]

[chef-logging]

[chef-spanner]

[chef-sql]

[chef-storage]

[ansible]

@chrisst
Copy link
Contributor Author

chrisst commented Sep 19, 2018

example output w/out using the debug flag:

./compiler  -p products/compute  -e terraform -o "${GOPATH}/src/github.com/terraform-providers/terraform-provider-google/"
I, [2018-09-19T17:23:02.512486 #93452]  INFO -- : Compiling 'products/compute' output to '/Users/chrisst/work/go/src/github.com/terraform-providers/terraform-provider-google/'
I, [2018-09-19T17:23:02.512588 #93452]  INFO -- : Generating types: ALL
I, [2018-09-19T17:23:03.671524 #93452]  INFO -- : Excluding BackendService per API catalog
I, [2018-09-19T17:23:03.671577 #93452]  INFO -- : Excluding DiskType per API catalog
I, [2018-09-19T17:23:04.586324 #93452]  INFO -- : Excluding GlobalForwardingRule per API catalog
I, [2018-09-19T17:23:05.273870 #93452]  INFO -- : Excluding InstanceTemplate per API catalog
I, [2018-09-19T17:23:05.273917 #93452]  INFO -- : Excluding License per API catalog
I, [2018-09-19T17:23:05.273931 #93452]  INFO -- : Excluding Image per API catalog
I, [2018-09-19T17:23:05.273943 #93452]  INFO -- : Excluding Instance per API catalog
I, [2018-09-19T17:23:05.273953 #93452]  INFO -- : Excluding InstanceGroup per API catalog
I, [2018-09-19T17:23:05.273963 #93452]  INFO -- : Excluding InstanceGroupManager per API catalog
I, [2018-09-19T17:23:05.273973 #93452]  INFO -- : Excluding MachineType per API catalog
I, [2018-09-19T17:23:05.273983 #93452]  INFO -- : Excluding Network per API catalog
I, [2018-09-19T17:23:05.273992 #93452]  INFO -- : Excluding Region per API catalog
I, [2018-09-19T17:23:05.537435 #93452]  INFO -- : Excluding RegionDiskType per API catalog
I, [2018-09-19T17:23:05.537527 #93452]  INFO -- : Excluding RegionDisk per API version
I, [2018-09-19T17:23:05.937309 #93452]  INFO -- : Excluding Snapshot per API catalog
I, [2018-09-19T17:23:07.010050 #93452]  INFO -- : Excluding TargetPool per API catalog
I, [2018-09-19T17:23:07.490202 #93452]  INFO -- : Excluding UrlMap per API catalog
I, [2018-09-19T17:23:07.711020 #93452]  INFO -- : Excluding Zone per API catalog

@rambleraptor
Copy link
Contributor

100% agree on this. We don't really use the info logs at all.

The INFO logs are getting filled with what looks like debug level information.
When compiling 1 product for 1 provider there are 16k INFO statements and zero
DEBUG level logs. This makes it difficult to show anything important in the
standard logging without escalating to WARN.

This change will move most of the output to debug level and set the default
logging level to INFO. The -d flag will still show all 16K lines of output but
at INFO there will only be a message for what is getting generated and what is
going to be excluded.

This will require a bit of a paradigm shift for people to start using debug
going forward where info was previously used.
@modular-magician
Copy link
Collaborator

I am a robot that works on MagicModules PRs!
I checked the downstream repositories (see README.md for which ones I can write to), and none of them seem to have any changes.

Once this PR is approved, you can feel free to merge it without taking any further steps.

@chrisst chrisst merged commit ba828ee into GoogleCloudPlatform:master Sep 21, 2018
@chrisst chrisst deleted the tuning-log-output branch September 21, 2018 01:14
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.

4 participants