skip to main content
Using Environment Variables
Almost every switch in ICE Agent has an associated environment variable (described using the --help switch). When a variable with this name exists in the environment, then ICE Agent will treat the value of the variable as the switch value.
For example, the log-level can be specified by setting the ICE_AGENT_LOG_LEVEL environment variable.
export ICE_AGENT_LOG_LEVEL=all
agent --version
…is equivalent to:
agent -l all --version
When both the environment variable and command-line switch is provided, the command-line value takes precedence. In the following example, all logging will be disabled because the -l off switch takes precedence over the ICE_AGENT_LOG_LEVEL variable:
export ICE_AGENT_LOG_LEVEL=all
agent -l off --version
The syntax for setting environment variables varies based on operating system and shell. Consult your operating system’s documentation for exact details. These examples are valid in most Linux/macOS shells.