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

Distinguish log output from 'interactive' feedback in CLI #507

Closed
orpheuslummis opened this issue Jun 7, 2022 · 1 comment · Fixed by #568
Closed

Distinguish log output from 'interactive' feedback in CLI #507

orpheuslummis opened this issue Jun 7, 2022 · 1 comment · Fixed by #568
Assignees
Labels
area/cli Related to the CLI binary area/logging Related to the logging/logger system
Milestone

Comments

@orpheuslummis
Copy link
Contributor

As pointed out by John on #389 (comment)

Several implementation ideas related to this:

  • extend our internal logger interface with log.Print
  • helper func in cli to handle the special requirement

Some goals:

  • avoid double outputs
  • always machine readable and equally-as-easily-handable as log output
  • avoid repetitive code
@orpheuslummis orpheuslummis added area/logging Related to the logging/logger system area/cli Related to the CLI binary labels Jun 7, 2022
@orpheuslummis orpheuslummis added this to the DefraDB v0.3 milestone Jun 7, 2022
@orpheuslummis orpheuslummis self-assigned this Jun 7, 2022
@fredcarle
Copy link
Collaborator

Thinking about this a little more, we could keep track of where the logs are sent. If they are sent to the console, then there is nothing else to send as the dev will see the logs anyways. However, if the logs are sent somewhere else, then we could send human friendly messages to the console. That would mean that the solution would involve some modification of the internal logger.

fredcarle added a commit that referenced this issue Jul 6, 2022
…logging to file. (#568)

Relevant issue(s)
Resolves #507

Description
This PR adds the ability to send user feedback to the console even when we configure Defra to send the log to a file. Feedback is sent in plain text as a simple message.
shahzadlone pushed a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
…logging to file. (sourcenetwork#568)

Relevant issue(s)
Resolves sourcenetwork#507

Description
This PR adds the ability to send user feedback to the console even when we configure Defra to send the log to a file. Feedback is sent in plain text as a simple message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to the CLI binary area/logging Related to the logging/logger system
Projects
None yet
2 participants