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

Remove structured logs exp flag #2113

Merged

Conversation

carolynvs
Copy link
Member

What does this change

Remove structured-logs experimental flag

We've been using structured-logs for months and it's working well at this point.

Add NoopFeature flag for testing

When I removed the last experimental feature flag, that caused a bunch of tests to not compile that verify that our experimental feature flags are working.

I've added a NoopFeature flag that we can use to always have at least one flag for testing. It's not used in the codebase to enable any functionality.

Add setting for the console log format

The structure-logs feature flag was being used to indicate not only that the logs and telemetry config sections should be used, but also that the format of the logs printed to the console should include the timestamp and log level.

I've added a property to the logs config section, structured, to replace that now that we aren't using the feature flag anymore.

Rename logs.enabled to logs.log-to-file

I realized that the logs.enabled config setting is confusing. It's actually used to toggle logging to a file. I've renamed it to
log-to-file so that it's more clear what the setting controls.

What issue does it fix

Closes #2075

Notes for the reviewer

N/A

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

We've been using structured-logs for months and it's working well at
this point.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
When I removed the last experimental feature flag, that caused a bunch
of tests to not compile that verify that our experimental feature flags
are working.

I've added a NoopFeature flag that we can use to always have at least
one flag for testing. It's not used in the codebase to enable any
functionality.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
The structure-logs feature flag was being used to indicate not only that
the logs and telemetry config sections should be used, but also that the
format of the logs printed to the console should include the timestamp
and log level.

I've added a property to the logs config section, structured, to replace
that now that we aren't using the feature flag anymore.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
I realized that the logs.enabled config setting is confusing. It's
actually used to toggle logging to a file. I've renamed it to
log-to-file so that it's more clear what the setting controls.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
@carolynvs carolynvs marked this pull request as ready for review May 31, 2022 18:19
@carolynvs carolynvs requested a review from VinozzZ May 31, 2022 18:21
@carolynvs carolynvs merged commit 1d61827 into getporter:release/v1 Jun 1, 2022
@carolynvs carolynvs deleted the remove-structured-logs-exp-flag branch June 1, 2022 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants