ServerLogger Class Reference

Class similar to Logger but handling only CacheServer events. More...

#include <ServerLogger.h>

List of all members.

Public Member Functions

 ServerLogger (unsigned interval=1, std::string directory="server_logs")
 Constructor.
 ~ServerLogger ()
 Kills the thread and closes the output.
void saveLogs ()
 Saves logs to disk.
void operator() ()
 ServerLogger thread main body.
void logNewConnection (const std::string &ip, unsigned port)
 EVENT LOGGING METHODS.
void logConnectionRemoved (const std::string &ip, unsigned port)
void logWaitingForNewRequest ()
long long logRequestStart (std::vector< std::string > fields)
long long logRequestStart (std::vector< std::string > fields, std::string object)
void logRequestPerformed (long long id)
void logReplySent (long long id)
void logConnectionTimeout ()
void logSocketError ()


Detailed Description

Class similar to Logger but handling only CacheServer events.

Definition at line 19 of file ServerLogger.h.


Constructor & Destructor Documentation

ServerLogger::ServerLogger ( unsigned  interval = 1,
std::string  directory = "server_logs" 
)

Constructor.

Parameters:
interval Time interval between saving logs to file.
directory Directory to save server logs.

Definition at line 28 of file ServerLogger.cpp.


Member Function Documentation

void ServerLogger::operator() (  ) 

ServerLogger thread main body.

Saves logs in the infinite loop

Definition at line 21 of file ServerLogger.cpp.

void ServerLogger::logNewConnection ( const std::string &  ip,
unsigned  port 
)

EVENT LOGGING METHODS.

For exapmle logNewConnection() logs incoming new connection.

All this methods are self-explanatory. In cases of confusion read the method name again ;)

Definition at line 111 of file ServerLogger.cpp.

void ServerLogger::logConnectionRemoved ( const std::string &  ip,
unsigned  port 
)

See also:
logNewConnection()

Definition at line 119 of file ServerLogger.cpp.

void ServerLogger::logWaitingForNewRequest (  ) 

See also:
logNewConnection()

Definition at line 127 of file ServerLogger.cpp.

long long ServerLogger::logRequestStart ( std::vector< std::string >  fields  ) 

See also:
logNewConnection()

Definition at line 133 of file ServerLogger.cpp.

long long ServerLogger::logRequestStart ( std::vector< std::string >  fields,
std::string  object 
)

See also:
logNewConnection()

Definition at line 147 of file ServerLogger.cpp.

void ServerLogger::logRequestPerformed ( long long  id  ) 

See also:
logNewConnection()

Definition at line 162 of file ServerLogger.cpp.

void ServerLogger::logReplySent ( long long  id  ) 

See also:
logNewConnection()

Definition at line 170 of file ServerLogger.cpp.

void ServerLogger::logConnectionTimeout (  ) 

See also:
logNewConnection()

Definition at line 178 of file ServerLogger.cpp.

void ServerLogger::logSocketError (  ) 

See also:
logNewConnection()

Definition at line 185 of file ServerLogger.cpp.


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

Generated on Fri Jan 8 10:38:13 2010 for dreamcache by  doxygen 1.5.5