Skip to content

Conversation

lacer93
Copy link
Contributor

@lacer93 lacer93 commented Sep 6, 2022

#13

Implement a feature switch to turn off log enhancement for JSON logs
Feature switch defaults to true, so behaviour is unchanged

PR Details

Add a feature switch to turn off log enhancement for JSON logs

Description

Implement a feature switch (via the enrivonment variable SUMO_ENHANCE_JSON_LOGS) which defaults to true so current behaviour remains unchanged. If the feature switch is set to false then the message sent to SumoLogic will not contain any addition metadata only the actual log message.

Related Issue

#13

Checklist

  • Updated CHANGELOG.md. (there is no changelog file)
  • Ran unit tests locally.

@lacer93 lacer93 requested a review from a team as a code owner September 6, 2022 16:24
@lacer93 lacer93 changed the title Address feature request in Issue 13 Add feature switch for JSON log enhancement Sep 6, 2022
@lacer93
Copy link
Contributor Author

lacer93 commented Sep 7, 2022

@himanshu219 please take a look when you can.

} else {
item["message"] = json
if s.config.EnhanceJsonLogs {
item = json
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't it be opposite if enhance json logs is true then item["message"] = json else item = json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, that's correct. Fixing it.

SumoLogic#13

Implement a feature switch to turn off log enhancement for JSON logs
Feature switch defaults to `true`, so behaviour is unchanged
@lacer93 lacer93 force-pushed the enhance-json-logs-feature-switch branch from ac32200 to 2b31f95 Compare September 8, 2022 09:04
@himanshu219 himanshu219 merged commit 5ee12ea into SumoLogic:main Sep 8, 2022
@lacer93 lacer93 deleted the enhance-json-logs-feature-switch branch September 8, 2022 09:19
@lacer93
Copy link
Contributor Author

lacer93 commented Sep 8, 2022

@himanshu219 thanks for the merge. Should I make a new release with it or is that your responsibility?

@himanshu219
Copy link
Contributor

himanshu219 commented Sep 8, 2022

release is done automatically via github actions I will push the new tag

@lacer93
Copy link
Contributor Author

lacer93 commented Sep 12, 2022

@himanshu219 do you have an ETA for that?

@himanshu219
Copy link
Contributor

new release is published.

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