LogServer Class Reference
[Kernel Module]

#include <logserver.h>

Inheritance diagram for LogServer:

Server< LogServer >

List of all members.


Detailed Description

This server provides logging messages.

Public Types

enum  LogLevel {
  LL_DEBUG = (1 << 0), LL_INFO = (1 << 1), LL_WARNING = (1 << 2), LL_ERROR = (1 << 3),
  LL_CRITICAL = (1 << 4), LL_ALL_STD = LL_DEBUG | LL_INFO, LL_ALL_ERR = LL_WARNING | LL_ERROR | LL_CRITICAL, LL_ALL = LL_DEBUG | LL_INFO | LL_WARNING | LL_ERROR | LL_CRITICAL
}
typedef void LogFunction (LogLevel, const string &, int, const string &)

Public Member Functions

 LogServer ()
virtual ~LogServer ()
bool RegisterFile (File *file, int levels, bool close=false)
bool RegisterFile (const string &file_path, int levels)
bool RegisterFunction (LogFunction *func, int levels)
void UnregisterAll ()
void WriteInfo (const char *file, int line, const char *message,...)
void WriteWarning (const char *file, int line, const char *message,...)
void WriteError (const char *file, int line, const char *message,...)
void WriteCritical (const char *file, int line, const char *message,...)
void WriteDebug (const char *file, int line, const char *message,...)

Private Types

typedef vector
< LogEntry
EntryArray
typedef
EntryArray::iterator 
EntryArrayIter

Private Member Functions

void Lock () const
void Unlock () const
void WriteMessage (LogLevel level, const char *file, int line, const char *message, va_list args)

Private Attributes

EntryArray entries
Mutexmutex

Classes

struct  LogEntry

Member Typedef Documentation

typedef void LogServer::LogFunction(LogLevel, const string &, int, const string &)

typedef vector<LogEntry> LogServer::EntryArray [private]

typedef EntryArray::iterator LogServer::EntryArrayIter [private]


Member Enumeration Documentation

enum LogServer::LogLevel

Enumerator:
LL_DEBUG 
LL_INFO 
LL_WARNING 
LL_ERROR 
LL_CRITICAL 
LL_ALL_STD 
LL_ALL_ERR 
LL_ALL 


Constructor & Destructor Documentation

LogServer::LogServer (  ) 

LogServer::~LogServer (  )  [virtual]


Member Function Documentation

bool LogServer::RegisterFile ( File file,
int  levels,
bool  close = false 
)

bool LogServer::RegisterFile ( const string &  file_path,
int  levels 
)

bool LogServer::RegisterFunction ( LogFunction func,
int  levels 
)

void LogServer::UnregisterAll (  ) 

void LogServer::WriteInfo ( const char *  file,
int  line,
const char *  message,
  ... 
) [inline]

void LogServer::WriteWarning ( const char *  file,
int  line,
const char *  message,
  ... 
) [inline]

void LogServer::WriteError ( const char *  file,
int  line,
const char *  message,
  ... 
) [inline]

void LogServer::WriteCritical ( const char *  file,
int  line,
const char *  message,
  ... 
) [inline]

void LogServer::WriteDebug ( const char *  file,
int  line,
const char *  message,
  ... 
) [inline]

void LogServer::Lock (  )  const [inline, private]

void LogServer::Unlock (  )  const [inline, private]

void LogServer::WriteMessage ( LogLevel  level,
const char *  file,
int  line,
const char *  message,
va_list  args 
) [private]


Member Data Documentation

EntryArray LogServer::entries [private]

Mutex* LogServer::mutex [private]


The documentation for this class was generated from the following files:
Generated on Sat Oct 20 14:47:32 2007 for Dark Oberon by  doxygen 1.5.3