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

Log.h File Reference

More...

#include <cstdio>
#include <string>
#include <SimData/LogStream.h>
#include <SimData/Namespace.h>
#include <SimData/Export.h>

Go to the source code of this file.

Defines

#define SIMDATA_LOG(C, P, M)   simdata::log() << simdata::loglevel(C,P) << M << std::endl
 Log a message.


Enumerations

enum  {
  LOG_BULK, LOG_TRACE, LOG_DEBUG, LOG_INFO,
  LOG_WARNING, LOG_ALERT, LOG_ERROR
}
 Log message priority levels. More...

enum  {
  LOG_NONE = 0x00000000, LOG_TYPE = 0x00000001, LOG_ARCHIVE = 0x00000002, LOG_REGISTRY = 0x00000004,
  LOG_ALL = 0xffffffff
}
 Log message categories used internally by SimData. More...


Functions

NAMESPACE_SIMDATA void error (std::string const &msg)
 Display a fatal error message to stderr and exit.

SIMDATA_EXPORT logstreamlog ()
 Return the one and only logstream instance.


Detailed Description


Define Documentation

#define SIMDATA_LOG C,
P,
     simdata::log() << simdata::loglevel(C,P) << M << std::endl
 

Log a message.

Parameters:
C  debug class
P  priority
M  message


Enumeration Type Documentation

anonymous enum
 

Log message priority levels.

Enumeration values:
LOG_BULK 
LOG_TRACE 
LOG_DEBUG 
LOG_INFO 
LOG_WARNING 
LOG_ALERT 
LOG_ERROR 

anonymous enum
 

Log message categories used internally by SimData.

An application using the SimData logging facilities should define its own specialized set of categories.

Enumeration values:
LOG_NONE 
LOG_TYPE 
LOG_ARCHIVE 
LOG_REGISTRY 
LOG_ALL 


Function Documentation

NAMESPACE_SIMDATA void error std::string const &    msg [inline]
 

Display a fatal error message to stderr and exit.

SIMDATA_EXPORT logstream& log   [inline]
 

Return the one and only logstream instance.

We use a function instead of a global object so we are assured that cerr has been initialised.

Returns:
current logstream


SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:39 2003, using Doxygen 1.2.18.

[SF.net]