Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

lcas_setup.h File Reference

library to setup LCAS environment More...

Go to the source code of this file.

Defines

#define LCAS_SETUP_ERROR_OPEN   1
#define LCAS_SETUP_ERROR_READ   2
#define LCAS_SETUP_ERROR_READ_SIZE   3
#define LCAS_SETUP_ERROR_CLOSE   4
#define LCAS_SETUP_ERROR_PARSE   5
#define LCAS_SETUP_ERROR_ARGUMENT   6

Functions

LCAS_SETUP_C_STORAGE_CLASS int lcas_setup (const char *config_file)
 Setup of the LCAS environment.


Detailed Description

library to setup LCAS environment

Author:
Martijn Steenbakkers for the EU DataGrid.
This file contains the routines to setup the LCAS environment. The procedure is as follows: 1. If a configuration file is given, parameters will be read from there and the corresponding environment variables will be set. 2. Variables that are not set in the configuration file, but that are set already as an environment variable will be left untouched. 3. Variables that are not set in the configuration file and that are not set in the environment yet, will be set to (sensible) default values and the corresponding environment variables will be set.

Definition in file lcas_setup.h.


Define Documentation

#define LCAS_SETUP_ERROR_ARGUMENT   6
 

Error in parameters in configuration file

Definition at line 52 of file lcas_setup.h.

Referenced by lcas_setup().

#define LCAS_SETUP_ERROR_CLOSE   4
 

Error closing configuration file

Definition at line 50 of file lcas_setup.h.

Referenced by lcas_setup().

#define LCAS_SETUP_ERROR_OPEN   1
 

Error opening configuration file

Definition at line 47 of file lcas_setup.h.

Referenced by lcas_setup().

#define LCAS_SETUP_ERROR_PARSE   5
 

Error parsing configuration file

Definition at line 51 of file lcas_setup.h.

Referenced by lcas_setup().

#define LCAS_SETUP_ERROR_READ   2
 

Error reading configuration file

Definition at line 48 of file lcas_setup.h.

Referenced by lcas_setup().

#define LCAS_SETUP_ERROR_READ_SIZE   3
 

Error reading too large configuration file

Definition at line 49 of file lcas_setup.h.

Referenced by lcas_setup().


Function Documentation

lcas_setup const char *  config_file  ) 
 

Setup of the LCAS environment.

This function sets the following environment variables:

  1. LCAS_LOG_FILE: Name and location of the logfile
  2. LCAS_LOG_TYPE: Type of logging (logfile, syslog, both or none)
  3. LCAS_LOG_STRING: Log string to be prepended to the logging lines
  4. LCAS_DB_FILE: Name of the lcas policy file
  5. LCAS_DEBUG_LEVEL: Debug level (0-5)
  6. LCAS_MOD_DIR: Location of the LCAS library
  7. LCAS_DIR: Location of the LCAS config files
  8. LCAS_ETC_DIR: Location of the LCAS config files (=LCAS_DIR)

Parameters:
config_file name of the configuration file that contains the parameters to be read
Return values:
0 setup succeeded.
1 setup failed.

Definition at line 155 of file lcas_setup.c.

References DO_SYSLOG, DO_USRLOG, lcas_genfilename(), LCAS_MAXARGS, LCAS_SETUP_ERROR_ARGUMENT, LCAS_SETUP_ERROR_CLOSE, LCAS_SETUP_ERROR_OPEN, LCAS_SETUP_ERROR_PARSE, LCAS_SETUP_ERROR_READ, LCAS_SETUP_ERROR_READ_SIZE, and lcas_tokenize().


Generated on Fri May 27 18:10:49 2005 for lcas by doxygen 1.3.5