strix icon indicating copy to clipboard operation
strix copied to clipboard

feat: Add `--verbose` / `--debug` CLI Flags

Open yokoszn opened this issue 1 month ago • 1 comments

Closes #144

Summary

  • Add -v/--verbose flag (stackable: -v, -vv, -vvv) for increasing log verbosity
  • Add --debug flag as shortcut for maximum verbosity (-vvv)
  • Logs output to both stderr and strix_runs/{run_name}/debug.log when verbosity > 0
  • At -vvv/--debug, enables litellm verbose mode for LLM debugging

Behavior

Flag Level stderr File
(none) ERROR yes no
-v WARNING yes yes
-vv INFO yes yes
-vvv / --debug DEBUG yes yes

Implementation Notes

  • Removed conflicting global logging.getLogger().setLevel(logging.ERROR)
  • Uses logging.basicConfig(force=True) to ensure configuration is applied
  • Uses litellm._logging._enable_debugging() for correct litellm debug toggle
  • Log file created in run directory after run name is generated

Other Considerations

Log Rotation / Max Size

  • Current implementation appends to debug.log indefinitely
  • Could add rotation or size limits for long-running sessions in future PR

Colored Log Output

  • Could use rich for colored stderr logging
  • Would improve readability in terminal

yokoszn avatar Nov 26 '25 09:11 yokoszn

While this is maybe a start, the output is really ugly and breaks the TUI. It also doesn't show the HTTP request body or response body in the output.

x676f64 avatar Nov 29 '25 22:11 x676f64