You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,3 +72,36 @@ You can also use the standard `cargo test` command if you really want:
72
72
```bash
73
73
cargo test
74
74
```
75
+
76
+
## Logging and Output
77
+
78
+
### Tracing Library
79
+
80
+
The `tracing` library is used for:
81
+
82
+
-**Sentry reporting**: Errors and warnings are automatically sent to Sentry for monitoring and debugging
83
+
-**Debug logging**: Internal debug information that helps with development and troubleshooting
84
+
85
+
**Important**: Tracing output does **not** surface to users unless they use the `--verbose` flag. By default, no tracing messages are shown in the console. They are primarily for Sentry reporting and debugging.
86
+
87
+
### Superconsole
88
+
89
+
The `superconsole` library is used for **surfacing information to users**. This is the primary mechanism for displaying:
90
+
91
+
- Progress messages
92
+
- Status updates
93
+
- Final results
94
+
- User-facing error messages
95
+
96
+
### Error Handling
97
+
98
+
When errors occur:
99
+
100
+
1.**Always capture errors with `tracing::error!()`** - This ensures errors are logged to Sentry for monitoring
101
+
2.**Surface blocking errors to users via `superconsole`** - If an error blocks execution, it should be displayed to the user through the display system (see `cli/src/error_report.rs` for examples)
102
+
103
+
The pattern is:
104
+
105
+
- Use `tracing` for observability and debugging (Sentry + optional verbose output)
106
+
- Use `superconsole` for user-facing communication
107
+
- Errors that block execution should use both: `tracing` for logging and `superconsole` for user display
0 commit comments