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

_lcmaps_log.h File Reference

Internal header file for LCMAPS logging routines. More...

#include "lcmaps_log.h"

Go to the source code of this file.

Defines

#define MAX_LOG_BUFFER_SIZE   2048
#define DO_USRLOG   ((unsigned short)0x0001)
#define DO_SYSLOG   ((unsigned short)0x0002)

Functions

int lcmaps_log_open (char *path, FILE *fp, unsigned short logtype)
 Start logging.

int lcmaps_log_close ()
 Stop logging.


Detailed Description

Internal header file for LCMAPS logging routines.

Author:
Martijn Steenbakkers for the EU DataGrid.

Definition in file _lcmaps_log.h.


Define Documentation

#define DO_SYSLOG   ((unsigned short)0x0002)
 

flag to indicate that syslogging has to be done

Definition at line 41 of file _lcmaps_log.h.

Referenced by lcmaps_init(), lcmaps_log_open(), and lcmaps_setup().

#define DO_USRLOG   ((unsigned short)0x0001)
 

flag to indicate that user logging has to be done

Definition at line 39 of file _lcmaps_log.h.

Referenced by lcmaps_init(), lcmaps_log_open(), and lcmaps_setup().

#define MAX_LOG_BUFFER_SIZE   2048
 

Maximum logging buffer size, length of log may not exceed this number

Definition at line 36 of file _lcmaps_log.h.

Referenced by lcmaps_log(), lcmaps_log_a_string(), lcmaps_log_debug(), and lcmaps_log_time().


Function Documentation

lcmaps_log_open char *  path,
FILE *  fp,
unsigned short  logtype
 

Start logging.

This function should only be used by the LCMAPS itself. It opens the logfile and tries to set the debugging level in the following order:

  1. Try if DEBUG_LEVEL > 0
  2. Try if environment variable LCMAPS_DEBUG_LEVEL is set and if it is an integer > 0
  3. Otherwise set debug_level = 0;

Parameters:
path path of logfile.
fp file pointer to already opened file (or NULL)
logtype DO_USRLOG, DO_SYSLOG
Return values:
0 succes.
1 failure.

Definition at line 89 of file lcmaps_log.c.

References DEBUG_LEVEL, debug_level, DO_SYSLOG, DO_USRLOG, extra_logstr, lcmaps_log(), lcmaps_logfp, logging_syslog, logging_usrlog, and should_close_lcmaps_logfp.

Referenced by lcmaps_init_and_logfile().


Generated on Sun May 29 21:22:11 2005 for lcmaps by doxygen 1.3.5