How loud a run is
shipped 2.0.0Every command takes the same two flags, and together they are one number.
| Level | Flag | What appears |
|---|---|---|
| -1 | -q, --quiet | warnings, the failure, and its fix hint |
| 0 | — | the steps: what happened |
| 1 | -v, --verbose | the plan and the phases: what the run is made of |
| 2 | -vv | every subprocess: what it does |
| 3 | -vvv | every return: exit code, and what came back |
| 4 | -vvvv | the output of a command that succeeded, too |
They are cumulative: -vvv prints everything the levels below it print.
-q keeps the warnings
A step that may fail and let the run continue is the one thing you read a
quiet log for. -q leaves those, the failure and the fix hint, and takes
everything else.
cwp refuses -q and -v together before anything runs. They ask for opposite
things, and choosing a winner quietly is worse than one line saying so.
Two levels apply everywhere, two do not
-q, -vv and -vvv work on every command: every subprocess cwp starts goes
through one place, whatever the command was.
The plan and the phases are different. They exist for a command that has a
plan, one that can write something, and most of cwp reads. cwp status,
cwp doctor and cwp content list survey and report; there is nothing to
declare and no phases to pass through, so -v adds nothing to them and does not
pretend otherwise. Reference → What writes what lists the commands
that declare a plan.
-v prints the plan and the phases
The plan is what the guards read, and it is the same block
--dry-run prints. Given both, you get it once.
phase: survey
plan: 7 step(s) — 2 write to the local site, 0 to the environment
1 read content down from staging
2 import database → local
3 post-pull hook → local (best-effort)
phase: refuse
phase: consent
phase: apply
✓ read content down from staging
A step names a side only where it writes to one. A step that writes a file
into your repository writes to no site. (best-effort) marks a step whose
failure the run survives; everything else ends it.
On a live run the list stops at twenty rows and says how many it kept back. A dry run prints them all, because printing the plan is the whole of what it does.
-vv prints every command
Each subprocess as it runs:
$ cloudron exec --app staging -- wp db export /tmp/db.sql
This is the level a fix hint means when it says “re-run with -vv”.
-vvv prints what came back
$ cloudron exec --app staging -- wp db export /tmp/db.sql
exit 0 · 3 line(s) out
Standard error appears whenever there is any. Standard output appears only for a command that failed. That is a safety rule rather than a display choice. cwp’s stdout is the run’s payload: an options read carries whatever the site stores, and a database path carries a dump. On a failure the payload is the diagnosis. Otherwise the way to see it is to run the command the line above printed. No level prints what a command received on standard input.
Each stream stops at 20 lines or 2 KiB, whichever comes first, and says how many lines it dropped.
Each phase gets a total as the next one starts:
phase: survey
survey · 1.4s
phase: refuse
Durations, a command’s and a phase’s alike, appear only when the output goes to a terminal. They are the one part of this output that differs between two identical runs.
-vvvv prints the output of a command that worked
The fourth rung exists so the third can stay safe. Ask for it when you are debugging and you know what the command returns:
cwp pull staging --dry-run -vvvv
It prints the same capped excerpt for every command rather than only for the
ones that failed. On the wrong command that includes a credential or a list of
addresses. For that reason it sits one v further than anybody types by
accident. It is not the default.
Where a flag cannot reach
CWP_VERBOSE sets the level for a hook or a CI step, from -1 to 4. A flag
on the command line wins over it.
CWP_VERBOSE=2 cwp pull staging
What the level does not change
--json prints the same envelope at every level. The level is for a person
watching. A machine caller reads steps and data, and those are complete
without it. All of the output above goes to standard error, so it never mixes with the
envelope on standard output.