/Users/jacquem/NetBeansProjects/MicromegasFramework/trunk/include/Log.hh File Reference

#include <sstream>
#include <string>
#include <stdio.h>
#include <iostream>
#include <sys/time.h>

Include dependency graph for Log.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Log< T >
class  Output2FILE
class  FILELog

Defines

#define ERROR   "ERROR"
#define WARNING   "WARNING"
#define INFO   "INFO"
#define DEBUG   "DEBUG"
#define DEBUG1   "DEBUG1"
#define FILELOG_DECLSPEC
#define FILELOG_MAX_LEVEL   logDEBUG
#define FILE_LOG(level)

Enumerations

enum  TLogLevel {
  logERROR, logWARNING, logINFO, logDEBUG1,
  logDEBUG
}

Functions

std::string NowTime ()


Define Documentation

#define ERROR   "ERROR"

Definition at line 10 of file Log.hh.

Referenced by Log< T >::ToString().

#define WARNING   "WARNING"

Definition at line 11 of file Log.hh.

Referenced by Log< T >::ToString().

#define INFO   "INFO"

Definition at line 12 of file Log.hh.

Referenced by main(), and Log< T >::ToString().

#define DEBUG   "DEBUG"

Definition at line 13 of file Log.hh.

Referenced by Log< T >::ToString().

#define DEBUG1   "DEBUG1"

Definition at line 14 of file Log.hh.

Referenced by Log< T >::ToString().

#define FILELOG_DECLSPEC

Definition at line 123 of file Log.hh.

#define FILELOG_MAX_LEVEL   logDEBUG

Definition at line 130 of file Log.hh.

#define FILE_LOG ( level   ) 

Value:

if (level > FILELOG_MAX_LEVEL) ;\
    else if (level > FILELog::ReportingLevel() || !Output2FILE::Stream()) ; \
    else FILELog().Get(level)

Definition at line 133 of file Log.hh.

Referenced by main().


Enumeration Type Documentation

enum TLogLevel

Enumerator:
logERROR 
logWARNING 
logINFO 
logDEBUG1 
logDEBUG 

Definition at line 19 of file Log.hh.


Function Documentation

std::string NowTime (  )  [inline]

Definition at line 140 of file Log.hh.

00141 {
00142     char buffer[11];
00143     time_t t;
00144     time(&t);
00145     tm r = {0};
00146     strftime(buffer, sizeof(buffer), "%X", localtime_r(&t, &r));
00147     struct timeval tv;
00148     gettimeofday(&tv, 0);
00149     char result[100] = {0};
00150     std::sprintf(result, "%s.%03ld", buffer, (long)tv.tv_usec / 1000); 
00151     return result;
00152 }


Generated on Thu Jul 9 09:49:38 2009 for MicromegasFramework by  doxygen 1.5.8