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

[Merged by Bors] - feat(base-types): more tweaks to runtime logging (VF-3552) #291

Closed
wants to merge 9 commits into from

Conversation

jonahsnider
Copy link
Contributor

@jonahsnider jonahsnider commented May 27, 2022

Fixes or implements VF-3552

Brief description. What is this change?

more minor changes to runtime logging utils & types

  • add LogLevel.OFF
  • export * for utils (just remember not to export anything that should be private/internal)
  • narrowing types
  • add type guard for narrowing string to LogLevel
  • updating the messages for various logs
  • a nodeTypeToStepLogKind() method for converting NodeType to human-friendly StepLogKind values

Checklist

  • this is a breaking change and should publish a new major version
  • appropriate tests have been written

@jonahsnider jonahsnider added the in progress In progress, should not be merged label May 27, 2022
@jonahsnider jonahsnider changed the title feat(base-types): add more runtime logging helpers (VF-3552) feat(base-types): more tweaks to runtime logging (VF-3552) May 27, 2022
@jonahsnider jonahsnider added ready for review and removed in progress In progress, should not be merged labels Jun 8, 2022
@jonahsnider jonahsnider marked this pull request as ready for review June 8, 2022 19:48
@@ -34,3 +37,42 @@ export enum StepLogKind {
export enum GlobalLogKind {
CONVERSATION_START = 'conversation_start',
}

const NODE_TYPE_TO_STEP_LOG_KIND = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is an incomplete list and i would greatly appreciate help in expanding it by adding new items to StepLogKind and mapping them here. this is used to map our internal NodeType values to a human-friendly StepLogKind value. ex. IF and IF_V2 correspond to the CONDITION step

Copy link
Contributor

Choose a reason for hiding this comment

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

Can always add to this as needed during log creation, too.

@jonahsnider
Copy link
Contributor Author

bors r+

bors-vf bot pushed a commit that referenced this pull request Jun 8, 2022
**Fixes or implements VF-3552**

### Brief description. What is this change?

more minor changes to runtime logging utils & types

- add `LogLevel.OFF`
- `export *` for utils (just remember not to export anything that should be private/internal)
- narrowing types
- add type guard for narrowing `string` to `LogLevel`
- updating the messages for various logs
- a `nodeTypeToStepLogKind()` method for converting `NodeType` to human-friendly `StepLogKind` values

### Checklist

- [ ] this is a breaking change and should publish a new major version
- [ ] appropriate tests have been written
@jonahsnider jonahsnider force-pushed the jonah/runtime-logging-helpers/VF-3552 branch from a46874d to 65e140d Compare June 8, 2022 22:20
@bors-vf
Copy link

bors-vf bot commented Jun 8, 2022

Canceled.

@jonahsnider
Copy link
Contributor Author

bors r+

bors-vf bot pushed a commit that referenced this pull request Jun 8, 2022
**Fixes or implements VF-3552**

### Brief description. What is this change?

more minor changes to runtime logging utils & types

- add `LogLevel.OFF`
- `export *` for utils (just remember not to export anything that should be private/internal)
- narrowing types
- add type guard for narrowing `string` to `LogLevel`
- updating the messages for various logs
- a `nodeTypeToStepLogKind()` method for converting `NodeType` to human-friendly `StepLogKind` values

### Checklist

- [ ] this is a breaking change and should publish a new major version
- [ ] appropriate tests have been written
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bors-vf
Copy link

bors-vf bot commented Jun 8, 2022

Pull request successfully merged into master.

Build succeeded:

@bors-vf bors-vf bot changed the title feat(base-types): more tweaks to runtime logging (VF-3552) [Merged by Bors] - feat(base-types): more tweaks to runtime logging (VF-3552) Jun 8, 2022
@bors-vf bors-vf bot closed this Jun 8, 2022
@bors-vf bors-vf bot deleted the jonah/runtime-logging-helpers/VF-3552 branch June 8, 2022 22:27
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.

2 participants