Skip to content

Commit

Permalink
Document verbosity flags (-v, -vv) support
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrebnov committed Dec 18, 2024
1 parent a95b89a commit 3dd7ec1
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions spiceaidocs/docs/cli/tracing.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,54 @@
---
title: 'Configuring Trace Levels'
sidebar_label: 'Trace Levels'
description: 'Documentation on how to configure Spice.ai OSS trace levels'
description: 'Documentation on configuring Spice.ai OSS trace levels'
pagination_prev: null
---

Trace verbosity is controlled by the `SPICED_LOG` environment variable.
Trace verbosity is controlled by the `SPICED_LOG` environment variable and verbosity flags (`-v`, `-vv`).

### Default Trace Levels

The default level is `INFO` for these components:

```bash
SPICED_LOG="task_history=INFO,spiced=INFO,runtime=INFO,secrets=INFO,data_components=INFO,cache=INFO,extensions=INFO,spice_cloud=INFO"
SPICED_LOG="task_history=INFO,spiced=INFO,runtime=INFO,secrets=INFO,data_components=INFO,cache=INFO,extensions=INFO,spice_cloud=INFO,llms=INFO,reqwest_retry::middleware=off,WARN"
```

### Enabling Debug Mode

To enable debug mode, which provides detailed logs, use:
To enable verbose logging (Debug level), use the `-v` CLI flag:

```bash
SPICED_LOG="DEBUG" spice run
spice run -v
spiced -v
```

For the most verbose logging, set the trace level to `TRACE`:
This sets `SPICED_LOG` to "DEBUG" level:

```bash
SPICED_LOG="TRACE" spice run
SPICED_LOG="task_history=DEBUG,spiced=DEBUG,runtime=DEBUG,secrets=DEBUG,data_components=DEBUG,cache=DEBUG,extensions=DEBUG,spice_cloud=DEBUG,llms=DEBUG,DEBUG" spice run
```

### Enabling Trace Mode

To enable the most verbose logging (Trace level), use the `-vv` CLI flag:

```bash
spice run -vv
spiced -vv
```

This sets `SPICED_LOG` to "TRACE" level:

```bash
SPICED_LOG="task_history=TRACE,spiced=TRACE,runtime=TRACE,secrets=TRACE,data_components=TRACE,cache=TRACE,extensions=TRACE,spice_cloud=TRACE,llms=TRACE,TRACE" spice run
```

### Granular Configuration

For specific components, adjust the trace levels as needed:
For specific component trace configuration, adjust the trace levels as needed:

```bash
SPICED_LOG="spiced=INFO,runtime=DEBUG,data_components=WARN,cache=WARN" spice run
```
```

0 comments on commit 3dd7ec1

Please sign in to comment.