---
id: TASK-20.4
title: Add tests/docs for logging behavior
status: Done
assignee: []
created_date: '2026-02-27 11:46'
updated_date: '2026-02-27 12:00'
labels: []
dependencies: []
references:
  - src/core/cmd.rs
  - src/core/cli.rs
  - docs/CHANGELOG.md
  - docs/
parent_task_id: TASK-20
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Update or add unit/integration tests to validate logging output without flakiness (e.g., capture stdout or use a test log sink). Update docs/CHANGELOG if logging configuration or behavior is user-visible.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Tests cover at least one representative log path for command selection/profile status and one command handler log
- [x] #2 Tests are robust (no timing/flaky output order issues)
- [x] #3 Docs/CHANGELOG updated if applicable
<!-- AC:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Added integration test covering logging output for command selection/profile status and build handler. Logs are enabled via `KAZE_TESTING=1` + `KAZE_LOGS=1`. No additional docs/CHANGELOG updates needed beyond prior logging env var docs. Tests: `just test`.
<!-- SECTION:NOTES:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Added integration test `kaze_build_logs_command_and_profile_status` to validate command selection/profile status and build handler logging, enabling logs via `KAZE_TESTING=1` + `KAZE_LOGS=1`. Tests: `just test`.
<!-- SECTION:FINAL_SUMMARY:END -->
