Skip to content

Commit 5ee764e

Browse files
author
Zhe Yu
committed
documentation about logging.
1 parent d339940 commit 5ee764e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/cli.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* [Removing a Collection](#removing-a-collection)
2222
* [Checking Project Setup](#checking-project-setup)
2323
* [Cleaning up](#cleaning-up)
24+
* [Debugging and Diagnosing](#debugging-and-diagnosing)
2425
* [Shell Completion](#shell-completion)
2526
* [Hardware Acceleration](#hardware-acceleration)
2627
* [For Developers](#for-developers)
@@ -417,6 +418,20 @@ some_message` and then getting an empty results.
417418
For empty collections and collections for removed projects, you can use the
418419
`vectorcode clean` command to remove them at once.
419420

421+
### Debugging and Diagnosing
422+
423+
When something doesn't work as expected, you can enable logging by setting the
424+
`VECTORCODE_LOG_LEVEL` variable to one of `ERROR`, `WARN` (`WARNING`), `INFO` or
425+
`DEBUG`. For the CLI that you interact with in your shell, this will output logs
426+
to `STDERR` and write a log file to `~/.local/share/vectorcode/logs/`. For LSP
427+
and MCP servers, because `STDIO` is used for the RPC, only the log file will be
428+
written.
429+
430+
For example:
431+
```bash
432+
VECTORCODE_LOG_LEVEL=INFO vectorcode vectorise file1.py file2.lua
433+
```
434+
420435
## Shell Completion
421436

422437
VectorCode supports shell completion for bash/zsh/tcsh. You can use `vectorcode -s {bash,zsh,tcsh}`

0 commit comments

Comments
 (0)