---
id: TASK-20.2
title: Wire logging into command selection and profile status
status: Done
assignee:
  - codex
created_date: '2026-02-27 11:46'
updated_date: '2026-02-27 11:56'
labels: []
dependencies: []
references:
  - docs/zync/lua/zync/api.lua
  - src/core/cmd.rs
  - src/core/config.rs
  - src/core/cli.rs
parent_task_id: TASK-20
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Emit log messages during command resolution and profile selection, mirroring zync’s behavior: log which command is run (or default build) and whether running with a selected profile or profile-less mode. Ensure this logs once per run, not per profile when `--all` is used (unless explicitly desired).
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Command selection logs match zync semantics (explicit vs default build)
- [x] #2 Profile status log matches zync semantics (using profile vs profile-less mode)
- [x] #3 Logging is emitted once per run (or with defined rules for `--all`)
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
- Identify where Kaze resolves the active command and profile selection in `core::cmd`.
- Add log calls using `core::log::info` to mirror zync’s messages (command selection + profile status).
- Ensure logging happens once per run (not per profile when `--all` is used).
- Run `just check`.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Added command-selection logging and profile-status logging in `core::cmd::run`. Command is logged once per run; profile status is logged per resolved config (per-profile when `--all`), mirroring zync behavior. `just check` passes.
<!-- SECTION:NOTES:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Added log messages for command selection and profile status during `core::cmd::run`, using `core::log::info`. Command logs once per run; profile status logs per resolved config (per-profile for `--all`) to mirror zync. Tests: `just check`.
<!-- SECTION:FINAL_SUMMARY:END -->
