1.2. Configuration


This section is outdated!


SAGA has been designed as a zero-configuration library. Unless you are experiencing problems with one of the default configuration settings, there’s really no need to create a configuration file for SAGA.

SAGA and its individual middleware adaptors provide various optional conf_options. While SAGA tries to provide sensible default values for the majority of these options (zero-conf), it can sometimes be necessary to modify or extend SAGA’s configuration. SAGA provides two ways to access and modify its configuration: via Configuration Files (recommended) and via the Configuration API (for advanced use-cases).

1.2.1. Configuration Files

If you need to make persistent changes to any of SAGA’s conf_options, the simplest option is to create a configuration file. During startup, SAGA checks for the existence of a configuration file in $HOME/.saga.conf. If that configuration file is found, it is parsed by SAGA’s configuration system. SAGA configuration files use a structure that looks like this:

    option = value

    option = value

    option = value

1.2.2. Configuration API Module radical.saga.utils.config

The config module provides classes and functions to introspect and modify SAGA’s configuration. The getConfig() function is used to get the GlobalConfig object which represents the current configuration of SAGA:

from radical.saga.utils.config import getConfig

sagaconf = getConfig()
print sagaconf.get_category('saga.utils.logger')