BESDebug Class Reference

#include <BESDebug.h>

Collaboration diagram for BESDebug:
Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static string GetPidStr ()
 return the pid as a string
static ostream * GetStrm ()
 return the debug stream
static void Help (ostream &strm)
 Writes help information for so that developers know what can be set for debugging.
static bool IsSet (const string &flagName)
 see if the debug context flagName is set to true
static void Register (const string &flagName)
 register the specified debug flag
static void Set (const string &flagName, bool value)
 set the debug context to the specified value
static void SetStrm (ostream *strm, bool created)
 set the debug output stream to the specified stream
static void SetUp (const string &values)
 Sets up debugging for the bes.

Detailed Description

Definition at line 84 of file BESDebug.h.


Member Function Documentation

static string BESDebug::GetPidStr (  )  [inline, static]

return the pid as a string

Returns:
the pid as a string

Definition at line 172 of file BESDebug.h.

References BESUtil::fastpidconverter().

Here is the call graph for this function:

static ostream* BESDebug::GetStrm (  )  [inline, static]

return the debug stream

Can be a file output stream or cerr

Returns:
the current debug stream

Definition at line 163 of file BESDebug.h.

Referenced by BESBasicInterface::build_data_request_plan().

void BESDebug::Help ( ostream &  strm  )  [static]

Writes help information for so that developers know what can be set for debugging.

Displays information about possible debugging context, such as nc, hdf4, bes

Parameters:
strm output stream to write the help information to

Definition at line 133 of file BESDebug.cc.

Referenced by BESServerUtils::show_usage().

static bool BESDebug::IsSet ( const string &  flagName  )  [inline, static]

see if the debug context flagName is set to true

Parameters:
flagName debug context to check if set
Returns:
whether the specified flagName is set or not

Definition at line 145 of file BESDebug.h.

Referenced by BESBasicInterface::build_data_request_plan().

static void BESDebug::Register ( const string &  flagName  )  [inline, static]

register the specified debug flag

Allows developers to register a debug flag for when Help method is called.

Parameters:
flagName debug context to register

Definition at line 124 of file BESDebug.h.

Referenced by ServerApp::initialize(), SampleModule::initialize(), CSVModule::initialize(), BESDefaultModule::initialize(), and BESDapModule::initialize().

static void BESDebug::Set ( const string &  flagName,
bool  value 
) [inline, static]

set the debug context to the specified value

Static function that sets the specified debug context (flagName) to the specified debug value (true or false). If the context is found then the value is set. Else the context is created and the value set.

Parameters:
flagName debug context flag to set to the given value
value set the debug context to this value

Definition at line 104 of file BESDebug.h.

Referenced by SetUp().

static void BESDebug::SetStrm ( ostream *  strm,
bool  created 
) [inline, static]

set the debug output stream to the specified stream

Static method that sets the debug output stream to the specified ostream.

If the ostream was created (not set to cerr), then the created flag should be set to true.

If the current debug stream is set and the _debug_strm_created flag is set to true then delete the current debug stream.

set the static _debug_strm_created flag to the passed created flag

Parameters:
strm set the current debug stream to strm
created whether the passed debug stream was created

Definition at line 197 of file BESDebug.h.

Referenced by SetUp().

void BESDebug::SetUp ( const string &  values  )  [static]

Sets up debugging for the bes.

This static method sets up debugging for the bes given a set of values typically passed on the command line. Might look like the following:

-d "bes.debug,nc,hdf4,bes"

this method will break this down to set the output stream to an ofstream for the file bes.debug and turn on debugging for nc, hdf4, and bes.

Parameters:
values to be parsed and set for debugging, bes.debug,nc,hdf4,bes

Definition at line 62 of file BESDebug.cc.

References Set(), and SetStrm().

Referenced by StandAloneApp::initialize(), ServerApp::initialize(), and CmdApp::initialize().

Here is the call graph for this function:


The documentation for this class was generated from the following files:

Generated on 18 Feb 2010 for OPeNDAP Hyrax Back End Server (BES) by  doxygen 1.6.1