From 14c3db8bbc3e999c60e2c8875775a2dbc233da04 Mon Sep 17 00:00:00 2001 From: Zhiming Ma Date: Thu, 21 Mar 2024 00:00:11 +0800 Subject: [PATCH] docs: update logs section of IDE extensions toubleshooting docs. (#1702) --- .../index.md} | 44 +++++++++++++------ .../troubleshooting/vscode-output-view.png | 3 ++ 2 files changed, 33 insertions(+), 14 deletions(-) rename website/docs/extensions/{troubleshooting.md => troubleshooting/index.md} (82%) create mode 100644 website/docs/extensions/troubleshooting/vscode-output-view.png diff --git a/website/docs/extensions/troubleshooting.md b/website/docs/extensions/troubleshooting/index.md similarity index 82% rename from website/docs/extensions/troubleshooting.md rename to website/docs/extensions/troubleshooting/index.md index fcd5eafeac2b..c28ba92f6f78 100644 --- a/website/docs/extensions/troubleshooting.md +++ b/website/docs/extensions/troubleshooting/index.md @@ -57,7 +57,7 @@ is empty. ### Authentication Token If you have enabled authentication on your Tabby server, you will need to set -the authentication token in the [config file](https://tabby.tabbyml.com/docs/extensions/configurations). +the authentication token in the IDE or the [config file](https://tabby.tabbyml.com/docs/extensions/configurations). ### Verify Tabby Server Status @@ -124,22 +124,19 @@ the server, make sure to specify the device in the arguments using `--device cu ## Want to Deep Dive via Logs? If you cannot solve the issue using the previous steps, you may want to -investigate further by checking the debug logs. +investigate further by checking the logs of Tabby extensions. +If you want help from the community, it is also recommended to share the logs +of the Tabby extensions. -### Tabby Agent Debug Logs +### VSCode -To enable Tabby agent debug logs, editing the [config file](https://tabby.tabbyml.com/docs/extensions/configurations), uncomment the `logs` section and set `level` to `"debug"`. Save the file to apply the changes. +For VSCode, you can check the `Output` window and select the `Tabby` channel or +`Tabby Agent` channel. +![VSCode Output View](./vscode-output-view.png) +The default log level is `info`. To enable debug logs, you can use the command +`Developer: Set Log Level...` to set the log level to `debug`. -Reproduce the issue you are facing and then check the logs located in `~/.tabby-client/agent/logs/`. -The logs are rotated, with the most recent log file named `tabby-agent.log`. -These logs are written using [pino](https://github.com/pinojs/pino), and you can -use `pino-pretty` to format the log file for easier readability. - -```shell -tail -f ~/.tabby-client/agent/logs/tabby-agent.log | npx pino-pretty -``` - -### IntelliJ Platform IDEs Logs +### IntelliJ Platform IDEs For IntelliJ Platform IDEs, you can check the logs for the IDE using `Help -> Show Log in Explorer|Finder|Files...`, or follow [this document](https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files) to locate the log file. @@ -148,6 +145,25 @@ keyword `com.tabbyml.intellijtabby`. You can also enable all level logs by editing `Help -> Diagnostic Tools -> Debug Log Settings...` and add `com.tabbyml.intellijtabby:all` to the list. +### Tabby Agent Logs + +As the agent runs as a separate Node.js process for IntelliJ Platform IDEs plugin +and Vim/NeoVim plugin, its logs are written separately. + +By default, the agent logs are set to `"silent"`, which means the agent logs are +not written to disk. To enable Tabby agent debug logs, editing the +[config file](https://tabby.tabbyml.com/docs/extensions/configurations), +uncomment the `logs` section and set `level` to `"debug"`, then save the file +to apply the changes. + +You can find the agent logs in the `~/.tabby-client/agent/logs` directory. These +logs are written using [pino](https://github.com/pinojs/pino), and you can +use `pino-pretty` to format the log file for easier readability. + +```shell +tail -f ~/.tabby-client/agent/logs/20240101.0.log | npx pino-pretty +``` + ## Still Have Issues? If you still have any issues, please feel free to [open an issue on github](https://github.com/TabbyML/tabby/issues/new), diff --git a/website/docs/extensions/troubleshooting/vscode-output-view.png b/website/docs/extensions/troubleshooting/vscode-output-view.png new file mode 100644 index 000000000000..cb26a65b0cce --- /dev/null +++ b/website/docs/extensions/troubleshooting/vscode-output-view.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f874495b4a659af5bbfd171306f061962c1491e3dae8657844adffc5cee7b92a +size 80703