Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

LogManager Class Reference

List of all members.

Public Member Functions

int close ()
int endPrintError ()
int getCycleLog ()
FilegetFile ()
int getGzip ()
int getLogSize ()
u_long getMaxSize ()
int getType ()
int load (string const &filename)
int load (const char *filename)
 LogManager ()
int preparePrintError ()
int requestAccess ()
void setCycleLog (int)
void setGzip (bool)
u_long setMaxSize (u_long)
void setType (int)
int storeFile ()
int terminateAccess ()
int write (string const &str, int len=0)
int write (const char *str, int len=0)
int writeln (string const &str)
int writeln (const char *)
 ~LogManager ()

Static Public Attributes

const int TYPE_CONSOLE = 1
const int TYPE_FILE = 2

Private Attributes

int cycleLog
File file
int gzipLog
int loaded
u_long max_size
Mutex mutex
int type

Constructor & Destructor Documentation

LogManager::LogManager  ) 
 

Initialize the object.

LogManager::~LogManager  ) 
 

Destroy the object.


Member Function Documentation

int LogManager::close  ) 
 

Close the file.

int LogManager::endPrintError  ) 
 

Exit from printing errors.

int LogManager::getCycleLog  ) 
 

Get if the log store log data on a new file when the max size is reached.

File * LogManager::getFile  ) 
 

Get a pointer to the file object.

int LogManager::getGzip  ) 
 

Returns nonzero if the log is using gzip for cycled logs.

int LogManager::getLogSize  ) 
 

Return the actual size for the log file.

u_long LogManager::getMaxSize  ) 
 

Return the max size for the log.

int LogManager::getType  ) 
 

Get the type of log.

int LogManager::load string const &  filename  ) 
 

int LogManager::load const char *  filename  ) 
 

Load and use the file to save logs. Return zero on sucess.

int LogManager::preparePrintError  ) 
 

Switch in the error output mode.

int LogManager::requestAccess  ) 
 

Request access for the thread.

void LogManager::setCycleLog int  l  ) 
 

Set the log to save results on a new file when the max size is reached.

void LogManager::setGzip bool  useGzip  ) 
 

Set if the log will cycle log files using gzip.

u_long LogManager::setMaxSize u_long  nMax  ) 
 

Set the max size for the log. Returns the old limit. Using a size of zero means that this limit is not used.

void LogManager::setType int  nType  ) 
 

Set the type for the log.

int LogManager::storeFile  ) 
 

Store the log manager in another file and reload the file.

int LogManager::terminateAccess  ) 
 

Terminate the access for the thread.

int LogManager::write string const &  str,
int  len = 0
 

int LogManager::write const char *  str,
int  len = 0
 

Write the string to the log. Returns 0 on success.

int LogManager::writeln string const &  str  ) 
 

int LogManager::writeln const char *  str  ) 
 

Write the string to the log plus termination character[s]. Returns 0 on success.


Member Data Documentation

int LogManager::cycleLog [private]
 

File LogManager::file [private]
 

int LogManager::gzipLog [private]
 

int LogManager::loaded [private]
 

loaded is used to store if the file object is initialized correctly.

u_long LogManager::max_size [private]
 

Mutex LogManager::mutex [private]
 

int LogManager::type [private]
 

const int LogManager::TYPE_CONSOLE = 1 [static]
 

const int LogManager::TYPE_FILE = 2 [static]
 


Generated on Wed Nov 8 13:12:49 2006 for MyServer by doxygen 1.3.6