Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

LOW_helper_msglog Class Reference

#include <LOW_helper_msglog.h>

List of all members.

Public Types

enum  debugLevel_t { portSerial_dl, devDS1820_dl, linkLock_dl, all_dl }

Static Public Methods

void enableDebugLevel (const debugLevel_t inLevel, const bool isEnabled=true)
void printPerror (const int inErrno, const char *inFormat,...)
 Print error message. More...

void printError (const char *inFormat,...)
 Print error message. More...

void printWarning (const char *inFormat,...)
 Print warning. More...

void printMessage (const char *inFormat,...)
 Print message. More...

void printDebug (const debugLevel_t inLevel, const char *inFormat,...)
 Print debug message. More...


Private Types

enum  logType_t { msg_log, warn_log, err_log, debug_log }

Static Private Methods

void va_printToLog (const logType_t inLogType, const char *inFormat, va_list inParamList)
unsigned int fprintLogHeader (FILE *inExtraStream, FILE *inStdStream)
void fprintfMulti (FILE *inExtraStream, FILE *inStdStream, const char *inFormat,...)
void vfprintfMulti (FILE *inExtraStream, FILE *inStdStream, const char *inFormat, va_list inAp)
void * callocCheck (const size_t inSize)

Static Private Attributes

bool errorOccured = false
bool debugLevels [all_dl]
bool useStdMsgStream = true
bool useStdWarnStream = true
bool useStdErrStream = true
bool useStdDebugStream = true
bool useExtraMsgStream = false
bool useExtraWarnStream = false
bool useExtraErrStream = false
bool useExtraDebugStream = false
FILE * stdOutStream = stdout
FILE * stdWarnStream = stderr
FILE * stdErrStream = stderr
FILE * stdDebugStream = stderr
FILE * extraOutStream = NULL
FILE * extraWarnStream = NULL
FILE * extraErrStream = NULL
FILE * extraDebugStream = NULL


Detailed Description

Todo:
Documentation of class.

Finish implementation of class.

Bug:
printXXX( "
") gives "(NULL)" output.

Author:
Harald Roelle, Helmut Reiser

Definition at line 39 of file LOW_helper_msglog.h.


Member Enumeration Documentation

enum LOW_helper_msglog::debugLevel_t
 

Enumeration values:
portSerial_dl 
devDS1820_dl 
linkLock_dl 
all_dl 

Definition at line 49 of file LOW_helper_msglog.h.

enum LOW_helper_msglog::logType_t [private]
 

Enumeration values:
msg_log 
warn_log 
err_log 
debug_log 

Definition at line 114 of file LOW_helper_msglog.h.

Referenced by va_printToLog().


Member Function Documentation

void * LOW_helper_msglog::callocCheck const size_t    inSize [static, private]
 

Definition at line 287 of file LOW_helper_msglog.cpp.

References printPerror().

Referenced by printPerror(), and va_printToLog().

void LOW_helper_msglog::enableDebugLevel const debugLevel_t    inLevel,
const bool    isEnabled = true
[static]
 

Definition at line 67 of file LOW_helper_msglog.cpp.

References debugLevels.

void LOW_helper_msglog::fprintfMulti FILE *    inExtraStream,
FILE *    inStdStream,
const char *    inFormat,
...   
[static, private]
 

Definition at line 271 of file LOW_helper_msglog.cpp.

References vfprintfMulti().

Referenced by fprintLogHeader(), and va_printToLog().

unsigned int LOW_helper_msglog::fprintLogHeader FILE *    inExtraStream,
FILE *    inStdStream
[static, private]
 

Definition at line 257 of file LOW_helper_msglog.cpp.

References fprintfMulti(), and LOW_platformMisc::getThreadID().

Referenced by va_printToLog().

void LOW_helper_msglog::printDebug const debugLevel_t    inLevel,
const char *    inFormat,
...   
[static]
 

Print debug message.

Definition at line 154 of file LOW_helper_msglog.cpp.

References all_dl, debug_log, debugLevels, and va_printToLog().

Referenced by LOW_link::commLock::commLock(), LOW_devDS1820::LOW_devDS1820(), LOW_portSerial_Linux::tty_readByte(), LOW_portSerial_Linux::tty_write(), and LOW_link::commLock::~commLock().

void LOW_helper_msglog::printError const char *    inFormat,
...   
[static]
 

Print error message.

Definition at line 115 of file LOW_helper_msglog.cpp.

References err_log, and va_printToLog().

Referenced by LOW_exception::logException(), and printPerror().

void LOW_helper_msglog::printMessage const char *    inFormat,
...   
[static]
 

Print message.

Definition at line 141 of file LOW_helper_msglog.cpp.

References msg_log, and va_printToLog().

void LOW_helper_msglog::printPerror const int    inErrno,
const char *    inFormat,
...   
[static]
 

Print error message.

Definition at line 81 of file LOW_helper_msglog.cpp.

References callocCheck(), and printError().

Referenced by callocCheck(), and LOW_exception::logException().

void LOW_helper_msglog::printWarning const char *    inFormat,
...   
[static]
 

Print warning.

Definition at line 128 of file LOW_helper_msglog.cpp.

References va_printToLog(), and warn_log.

void LOW_helper_msglog::va_printToLog const logType_t    inLogType,
const char *    inFormat,
va_list    inParamList
[static, private]
 

Definition at line 201 of file LOW_helper_msglog.cpp.

References callocCheck(), debug_log, err_log, extraDebugStream, extraErrStream, extraOutStream, extraWarnStream, fprintfMulti(), fprintLogHeader(), logType_t, msg_log, stdDebugStream, stdErrStream, stdOutStream, stdWarnStream, useExtraDebugStream, useExtraErrStream, useExtraMsgStream, useExtraWarnStream, useStdDebugStream, useStdErrStream, useStdMsgStream, useStdWarnStream, and warn_log.

Referenced by printDebug(), printError(), printMessage(), and printWarning().

void LOW_helper_msglog::vfprintfMulti FILE *    inExtraStream,
FILE *    inStdStream,
const char *    inFormat,
va_list    inAp
[static, private]
 

Definition at line 280 of file LOW_helper_msglog.cpp.

Referenced by fprintfMulti().


Member Data Documentation

bool LOW_helper_msglog::debugLevels [static, private]
 

Definition at line 41 of file LOW_helper_msglog.cpp.

Referenced by enableDebugLevel(), and printDebug().

bool LOW_helper_msglog::errorOccured = false [static, private]
 

Definition at line 40 of file LOW_helper_msglog.cpp.

FILE * LOW_helper_msglog::extraDebugStream = NULL [static, private]
 

Definition at line 59 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

FILE * LOW_helper_msglog::extraErrStream = NULL [static, private]
 

Definition at line 58 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

FILE * LOW_helper_msglog::extraOutStream = NULL [static, private]
 

Definition at line 56 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

FILE * LOW_helper_msglog::extraWarnStream = NULL [static, private]
 

Definition at line 57 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

FILE * LOW_helper_msglog::stdDebugStream = stderr [static, private]
 

Definition at line 55 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

FILE * LOW_helper_msglog::stdErrStream = stderr [static, private]
 

Definition at line 54 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

FILE * LOW_helper_msglog::stdOutStream = stdout [static, private]
 

Definition at line 52 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

FILE * LOW_helper_msglog::stdWarnStream = stderr [static, private]
 

Definition at line 53 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

bool LOW_helper_msglog::useExtraDebugStream = false [static, private]
 

Definition at line 50 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

bool LOW_helper_msglog::useExtraErrStream = false [static, private]
 

Definition at line 49 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

bool LOW_helper_msglog::useExtraMsgStream = false [static, private]
 

Definition at line 47 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

bool LOW_helper_msglog::useExtraWarnStream = false [static, private]
 

Definition at line 48 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

bool LOW_helper_msglog::useStdDebugStream = true [static, private]
 

Definition at line 46 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

bool LOW_helper_msglog::useStdErrStream = true [static, private]
 

Definition at line 45 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

bool LOW_helper_msglog::useStdMsgStream = true [static, private]
 

Definition at line 43 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().

bool LOW_helper_msglog::useStdWarnStream = true [static, private]
 

Definition at line 44 of file LOW_helper_msglog.cpp.

Referenced by va_printToLog().


The documentation for this class was generated from the following files:
Generated on Sun Jan 12 21:07:56 2003 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001