Skip to content

Improve logging cody debug messages #2583

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
merged 1 commit into from
Nov 7, 2024
Merged

Conversation

pkukielka
Copy link
Contributor

@pkukielka pkukielka commented Nov 5, 2024

Fixes https://linear.app/sourcegraph/issue/QA-149

Chnages

Adds detailed Cody logging, e.g. network errors.
Required dev mode (e.g. :customRunIde) or debug logging enabled in settings for trace/debug/info messages,
errors and warning are logged always. Cody Console is popping out only in dev mode regardless of the message severity.

Test plan

  1. Run :customRunIde - there is good chance you will notice some network errors at the start, but there should not be much of them
  2. Go to the Cody settings and enable debug logging.
  3. Restart IDE
  4. Now you should see much more debug messages in Cody Console and in the logs

image

pkukielka added a commit to sourcegraph/cody-public-snapshot that referenced this pull request Nov 6, 2024
## Changes

Fixes logging capability in agent.
Previously messages logged to output channel were visible only if added
using `append` or `appendLine`.
Now `trace` / `debug` / `info` / `warn` / `error` functions are also
logged properly.

## Test plan

As in sourcegraph/jetbrains#2583
@pkukielka pkukielka force-pushed the pkukielka/improve-cody-logging branch from 3d9b9f5 to 5169bd0 Compare November 7, 2024 09:13
@pkukielka pkukielka merged commit d241a09 into main Nov 7, 2024
6 of 7 checks passed
@pkukielka pkukielka deleted the pkukielka/improve-cody-logging branch November 7, 2024 09:23
kalanchan pushed a commit that referenced this pull request Nov 8, 2024
Fixes https://linear.app/sourcegraph/issue/QA-149

## Chnages

Adds detailed Cody logging, e.g. network errors.
Required dev mode (e.g. `:customRunIde`) or debug logging enabled in
settings for trace/debug/info messages,
errors and warning are logged always. Cody Console is popping out only
in dev mode regardless of the message severity.

## Test plan

1. Run `:customRunIde` - there is good chance you will notice some
network errors at the start, but there should not be much of them
2. Go to the Cody settings and enable debug logging.
3. Restart IDE
4. Now you should see much more debug messages in Cody Console and in
the logs


![image](https://github.com/user-attachments/assets/c7c92745-1cec-4e44-b348-22d4406ba419)
@kalanchan kalanchan mentioned this pull request Nov 8, 2024
kalanchan added a commit that referenced this pull request Nov 8, 2024
cherry pick #2583 - allowing flexibility as we didn't inform the team on
branch cut deadlines
 
Fixes https://linear.app/sourcegraph/issue/QA-149

## Chnages

Adds detailed Cody logging, e.g. network errors.
Required dev mode (e.g. `:customRunIde`) or debug logging enabled in
settings for trace/debug/info messages,
errors and warning are logged always. Cody Console is popping out only
in dev mode regardless of the message severity.

## Test plan

1. Run `:customRunIde` - there is good chance you will notice some
network errors at the start, but there should not be much of them
2. Go to the Cody settings and enable debug logging.
3. Restart IDE
4. Now you should see much more debug messages in Cody Console and in
the logs



![image](https://github.com/user-attachments/assets/c7c92745-1cec-4e44-b348-22d4406ba419)

## Test plan

<!-- All pull requests REQUIRE a test plan:
https://sourcegraph.com/docs/dev/background-information/testing_principles

Why does it matter?

These test plans are there to demonstrate that are following industry
standards which are important or critical for our customers.
They might be read by customers or an auditor. There are meant be simple
and easy to read. Simply explain what you did to ensure
your changes are correct!

Here are a non exhaustive list of test plan examples to help you:

- Making changes on a given feature or component:
- "Covered by existing tests" or "CI" for the shortest possible plan if
there is zero ambiguity
  - "Added new tests"
- "Manually tested" (if non trivial, share some output, logs, or
screenshot)
- Updating docs:
  - "previewed locally"
  - share a screenshot if you want to be thorough
- Updating deps, that would typically fail immediately in CI if
incorrect
  - "CI"
  - "locally tested"
-->

Co-authored-by: Piotr Kukiełka <pkukielka@users.noreply.github.com>
PriNova pushed a commit to PriNova/cody that referenced this pull request Nov 8, 2024
## Changes

Fixes logging capability in agent.
Previously messages logged to output channel were visible only if added
using `append` or `appendLine`.
Now `trace` / `debug` / `info` / `warn` / `error` functions are also
logged properly.

## Test plan

As in sourcegraph/jetbrains#2583
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