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

refactor: Change logging calls to use feedback in CLI package #714

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

fredcarle
Copy link
Collaborator

Relevant issue(s)

Resolves #662

Description

This PR changes all logging calls in the CLI package to include feedback.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • [ x I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

manual check

Specify the platform(s) on which this was tested:

  • MacOS

@fredcarle fredcarle added refactor This issue specific to or requires *notable* refactoring of existing codebases and components area/logging Related to the logging/logger system action/no-benchmark Skips the action that runs the benchmark. area/cli Related to the CLI binary labels Aug 3, 2022
@fredcarle fredcarle added this to the DefraDB v0.3.1 milestone Aug 3, 2022
@fredcarle fredcarle requested a review from a team August 3, 2022 04:57
@fredcarle fredcarle self-assigned this Aug 3, 2022
@fredcarle fredcarle force-pushed the fredcarle/refactor/I662-logger-to-feedback branch from 935d515 to 747e8f9 Compare August 3, 2022 06:15
@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #714 (747e8f9) into develop (3973c2d) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #714   +/-   ##
========================================
  Coverage    57.42%   57.43%           
========================================
  Files          143      143           
  Lines        16408    16406    -2     
========================================
  Hits          9422     9422           
+ Misses        6102     6100    -2     
  Partials       884      884           
Impacted Files Coverage Δ
cli/addreplicator.go 5.12% <0.00%> (ø)
cli/root.go 47.67% <0.00%> (ø)
cli/rpc.go 70.00% <0.00%> (ø)
cli/serverdump.go 15.38% <0.00%> (ø)
cli/start.go 14.75% <0.00%> (+0.15%) ⬆️

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

LGTM.

n.Close() //nolint:errcheck
db.Close(cmd.Context())
return err
return fmt.Errorf("failed to start P2P node: %w", err)
Copy link
Member

Choose a reason for hiding this comment

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

question: We remove logging here because we will log it once it bubble ups?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes 🙂

Copy link
Contributor

@orpheuslummis orpheuslummis left a comment

Choose a reason for hiding this comment

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

LGTM

@fredcarle fredcarle merged commit 31fb3f8 into develop Aug 3, 2022
@fredcarle fredcarle deleted the fredcarle/refactor/I662-logger-to-feedback branch August 3, 2022 16:51
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
…network#714)

Relevant issue(s)
Resolves sourcenetwork#662

Description
This PR changes all logging calls in the CLI package to include feedback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/cli Related to the CLI binary area/logging Related to the logging/logger system refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate CLI package from logger to feedback system
3 participants