Stdout & stderr


Principle: stderr for humans, stdout for machines + exit code


  • all logging
  • Infof - messages
  • User facing messages ?


  • expected command output
  • tabular format can have user-facing messages; all other formats - cannot
  • when explicit format (–yaml, --json), no user messages.


We should talk about renaming tabular to human output for version 3.0 of juju. With the change we don’t have to feel constrained by what we output to stdout. human output could contain table like outputs along with additional information (very contrived example).

Model    Controller  Cloud/Region  Version      SLA          Timestamp
default  test        lxd/default   2.7-beta1.1  unsupported  10:32:32+01:00

App    Version  Status   Scale  Charm  Store       Rev  OS      Notes
redis           waiting    0/1  redis  jujucharms    0  ubuntu  

Unit     Workload  Agent       Machine  Public address  Ports  Message
redis/0  waiting   allocating                                  waiting for machine

To see relations use --relations