openikev2::LogImpl Class Reference

This class represents a Log concrete implementation. More...

#include <logimpl.h>

Inheritance diagram for openikev2::LogImpl:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void setLogMask (uint16_t log_mask)
 Sets the log mask to be applied.
virtual void writeMessage (string who, string message, uint16_t type, bool main_info)=0
 Writes a log message to the log file.
virtual void open (string file_name)
 Opens the indicated file and writes subsequent log messages to it.
virtual void close ()
 Closes log file.
virtual void notifyBusEvent (const BusEvent &event)
 Method to receive Bus Events.

Protected Member Functions

 LogImpl ()
 Creates a new LogImpl and sets its attribute default values.

Protected Attributes

uint16_t log_mask
 Current log mask.
bool show_extra_info
 Indicates if extra information must be shown.
FILE * log_file
 File to write log information.

Friends

class Log

Detailed Description

This class represents a Log concrete implementation.

Author:
Pedro J. Fernandez Ruiz, Alejandro Perez Mendez <pedroj.fernandez@dif.um.es, alejandro_perez@dif.um.es>


Member Function Documentation

void openikev2::LogImpl::setLogMask ( uint16_t  log_mask  ) 

Sets the log mask to be applied.

Parameters:
log_mask Log mask

virtual void openikev2::LogImpl::writeMessage ( string  who,
string  message,
uint16_t  type,
bool  main_info 
) [pure virtual]

Writes a log message to the log file.

Parameters:
who Module writting the message
message Log message to be writed
type Type of log message (Log::LOG_INFO, D_THRD, ...)
main_info Indicates if date must be writed

void openikev2::LogImpl::open ( string  file_name  )  [virtual]

Opens the indicated file and writes subsequent log messages to it.

Parameters:
file_name File name

void openikev2::LogImpl::notifyBusEvent ( const BusEvent event  )  [virtual]

Method to receive Bus Events.

Parameters:
event Bus Event

Implements openikev2::BusObserver.


Generated on Fri Jul 27 11:04:51 2007 for libopenikev2 by  doxygen 1.5.1