Configuring Azion CLI's output

The outputs of CLI edge_applications commands in the terminal present, by default, only as minimal and essential information for the developer. You can configure your application to observe all outgoing messages, regardless of whether errors occur or not.

This setting can be useful for analyzing the command responses in more detail and correcting possible flaws in the project. However, detailed outputs can quickly clutter up your terminal screen with too much information.

To configure the output messages of the Azion CLI’s edge_applications command, follow the steps below:

  1. After initializing an edge application with the edge_applications init command, access the automatically created azion directory.

  2. Open the config.json file.

  3. In the init and build sections, change the "output-ctrl": "<value>" lines to the following values:

    • on-error: output messages will be detailed only when an error occurs. This is the default value for the key.
    • disable: the output messages will always be complete, regardless of the occurrence or not of errors in the execution of the commands.
    {
    "start": {
    "cmd": "...",
    "env": "./azion/webdev.env",
    "output-ctrl": "on-error"
    },
    "build": {
    "cmd": "...",
    "env": "./azion/webdev.env",
    "output-ctrl": "on-error"
    }
    }

Note: don’t forget the comma after the "env" line: "./azion/webdev.env".

  1. Save the file and restart the terminal.

Done. The next CLI commands will display messages with the level of detail specified in the above configuration.