fesa::FesaLogger Class Reference

#include <FesaLogger.h>

List of all members.

Public Types

enum  DIAG_FWK_TOPIC {
  getActionProfiling = 1 << 0, setActionProfiling = 1 << 1, rtActionProfiling = 1 << 2, eventProfiling = 1 << 3,
  notificationProfiling = 1 << 4, getActionTracking = 1 << 5, setActionTracking = 1 << 6, rtActionTracking = 1 << 7,
  eventTracking = 1 << 8, notificationTracking = 1 << 9, persistencyTracking = 1 << 10, transactionTracking = 1 << 11,
  subscriptionTracking = 1 << 12, signalHandlerTracking = 1 << 13, rdaTracking = 1 << 15, startUpTracking = 1 << 31
}
enum  LogType { errorType = 0, traceType = 1 }
enum  LogSeverity {
  fatal = 0, alert = 1, critical = 2, error = 3,
  warning = 4, notice = 5, none = 6, debug = 7
}
enum  LogAction { undefined = 0, start = 1, stop = 2 }

Public Member Functions

FesaLoggerlogError (LogSeverity severity, const std::string &sender)
bool isEnabledFor (int32_t topic, const std::string &name, LogAction action)
bool isEnabledFor (DIAG_FWK_TOPIC topic)
bool isEnabledFor (int32_t topic, AbstractDevice *pdev, const std::string &name, LogAction action)
 FesaLogger (const FesaLogger &)
 ~FesaLogger ()
void send (const char *msg, LogType type)

Static Public Member Functions

static bool isEnabled ()
static void init (char *bname)
static void enableConsoleOutput ()
static void disableConsoleOutput ()
static void reinit ()
static void destroy ()
static FesaLoggergetLogger (const std::string &source, const std::string &thread, const std::string &cname)
static FesaLoggergetLogger (const std::string &source, const std::string &thread)
static FesaLoggergetDefaultLogger ()
static void setDiagnosticMode (bool mode)
static void setCustomTopic (int32_t customTopic, const std::string &cname)

Public Attributes

int32_t customTopic_
std::string className_
std::string logSource_
std::string logThread_
std::string logName_

Static Public Attributes

static const std::string fwkSender = "FWK"
static const std::string usrSender = "USR"
static int32_t fwkTopic_ = 0xffffffff
static bool modeDiagnostic_ = false
static uint32_t logCount_ = 0
static TsCounter logTsc_
static std::string connectedHostName_ = ""
static int32_t connectedPortNumber_ = -1

Private Member Functions

 FesaLogger (FesaLoggerBuffer *pBuf)

Private Attributes

LogSeverity errSeverity_
LogType logType_
int32_t lastError_
FesaLoggerBufferlogBuffer_

Static Private Attributes

static UdpLoggerpUDPLog_ = NULL
static bool isInitPhase_ = true
static FesaLoggererrLog_
static const char * logActionStr_ [] = { "|-|", "|START|", "|STOP|" }
static std::map< std::string,
FesaLogger * > 
logFactoryMap_
static FesaLoggerdefaultLog_
static Mutex mutex_

Friends

class FesaLoggerBuffer

Detailed Description

Definition at line 79 of file FesaLogger.h.


Member Enumeration Documentation

Enumerator:
getActionProfiling 
setActionProfiling 
rtActionProfiling 
eventProfiling 
notificationProfiling 
getActionTracking 
setActionTracking 
rtActionTracking 
eventTracking 
notificationTracking 
persistencyTracking 
transactionTracking 
subscriptionTracking 
signalHandlerTracking 
rdaTracking 
startUpTracking 

Definition at line 102 of file FesaLogger.h.

Enumerator:
undefined 
start 
stop 

Definition at line 154 of file FesaLogger.h.

Enumerator:
fatal 
alert 
critical 
error 
warning 
notice 
none 
debug 

Definition at line 138 of file FesaLogger.h.

Enumerator:
errorType 
traceType 

Definition at line 127 of file FesaLogger.h.


Constructor & Destructor Documentation

fesa::FesaLogger::FesaLogger ( const FesaLogger refLogger  ) 
fesa::FesaLogger::~FesaLogger (  ) 

Destructor: clean associated ressources

Definition at line 80 of file FesaLogger.cpp.

References logBuffer_.

fesa::FesaLogger::FesaLogger ( FesaLoggerBuffer pBuf  )  [private]

Member Function Documentation

void fesa::FesaLogger::destroy (  )  [static]

Definition at line 168 of file FesaLogger.cpp.

References logFactoryMap_, and pUDPLog_.

void fesa::FesaLogger::disableConsoleOutput (  )  [static]

Definition at line 127 of file FesaLogger.cpp.

References customTopic_, fwkTopic_, isInitPhase_, logFactoryMap_, and setDiagnosticMode().

void fesa::FesaLogger::enableConsoleOutput (  )  [static]

Definition at line 107 of file FesaLogger.cpp.

References customTopic_, fwkTopic_, isInitPhase_, logFactoryMap_, and setDiagnosticMode().

FesaLogger * fesa::FesaLogger::getDefaultLogger (  )  [inline, static]

------------------------------------------------------------------------- in line meyhods

Definition at line 322 of file FesaLogger.h.

References defaultLog_.

FesaLogger * fesa::FesaLogger::getLogger ( const std::string &  source,
const std::string &  thread 
) [static]

Definition at line 188 of file FesaLogger.cpp.

References getLogger(), and fesa::undefinedClassName.

FesaLogger * fesa::FesaLogger::getLogger ( const std::string &  source,
const std::string &  thread,
const std::string &  cname 
) [static]
void fesa::FesaLogger::init ( char *  bname  )  [static]

Definition at line 90 of file FesaLogger.cpp.

bool fesa::FesaLogger::isEnabled (  )  [static]

Definition at line 100 of file FesaLogger.cpp.

References modeDiagnostic_.

bool fesa::FesaLogger::isEnabledFor ( int32_t  topic,
AbstractDevice pdev,
const std::string &  name = undefinedFunctionName,
LogAction  action = undefined 
) [inline]
bool fesa::FesaLogger::isEnabledFor ( DIAG_FWK_TOPIC  topic  )  [inline]

Definition at line 354 of file FesaLogger.h.

References fwkTopic_, modeDiagnostic_, and SET_TRACE_HEADER.

bool fesa::FesaLogger::isEnabledFor ( int32_t  topic,
const std::string &  name = undefinedFunctionName,
LogAction  action = undefined 
) [inline]

Definition at line 340 of file FesaLogger.h.

References customTopic_, logActionStr_, modeDiagnostic_, and SET_TRACE_HEADER.

FesaLogger & fesa::FesaLogger::logError ( LogSeverity  severity,
const std::string &  sender = FesaLogger::usrSender 
) [inline]

Definition at line 332 of file FesaLogger.h.

References errorType, errSeverity_, and logType_.

void fesa::FesaLogger::reinit (  )  [static]
void fesa::FesaLogger::send ( const char *  msg,
LogType  type 
)
void fesa::FesaLogger::setCustomTopic ( int32_t  customTopic,
const std::string &  cname 
) [static]

Definition at line 277 of file FesaLogger.cpp.

References className_, customTopic_, and logFactoryMap_.

Referenced by fesa::RTDiagnosticSetting::execute().

void fesa::FesaLogger::setDiagnosticMode ( bool  mode  )  [static]

Friends And Related Function Documentation

friend class FesaLoggerBuffer [friend]

Definition at line 244 of file FesaLogger.h.

Referenced by FesaLogger(), and getLogger().


Member Data Documentation

Definition at line 236 of file FesaLogger.h.

Referenced by FesaLogger(), getLogger(), and setCustomTopic().

std::string fesa::FesaLogger::connectedHostName_ = "" [static]

Definition at line 233 of file FesaLogger.h.

Referenced by fesa::RTDiagnosticSetting::execute(), reinit(), and setDiagnosticMode().

Definition at line 234 of file FesaLogger.h.

Referenced by fesa::RTDiagnosticSetting::execute(), reinit(), and setDiagnosticMode().

Definition at line 269 of file FesaLogger.h.

Definition at line 257 of file FesaLogger.h.

Referenced by FesaLogger(), logError(), send(), and fesa::FesaLoggerBuffer::sync().

const std::string fesa::FesaLogger::fwkSender = "FWK" [static]

Definition at line 87 of file FesaLogger.h.

int32_t fesa::FesaLogger::fwkTopic_ = 0xffffffff [static]
bool fesa::FesaLogger::isInitPhase_ = true [static, private]
int32_t fesa::FesaLogger::lastError_ [private]

Definition at line 264 of file FesaLogger.h.

Referenced by FesaLogger(), send(), setDiagnosticMode(), and fesa::FesaLoggerBuffer::sync().

const char * fesa::FesaLogger::logActionStr_ = { "|-|", "|START|", "|STOP|" } [static, private]

Definition at line 274 of file FesaLogger.h.

Referenced by isEnabledFor().

Definition at line 286 of file FesaLogger.h.

Referenced by FesaLogger(), and ~FesaLogger().

uint32_t fesa::FesaLogger::logCount_ = 0 [static]

Definition at line 222 of file FesaLogger.h.

Referenced by reinit().

std::map< std::string, FesaLogger * > fesa::FesaLogger::logFactoryMap_ [static, private]

Definition at line 239 of file FesaLogger.h.

Referenced by FesaLogger(), and getLogger().

Definition at line 237 of file FesaLogger.h.

Referenced by FesaLogger(), and getLogger().

Definition at line 238 of file FesaLogger.h.

Referenced by FesaLogger(), and getLogger().

Definition at line 225 of file FesaLogger.h.

Referenced by fesa::RTDiagnosticSetting::RTDiagnosticSetting().

Definition at line 260 of file FesaLogger.h.

Referenced by FesaLogger(), getLogger(), logError(), send(), and fesa::FesaLoggerBuffer::sync().

bool fesa::FesaLogger::modeDiagnostic_ = false [static]
Mutex fesa::FesaLogger::mutex_ [static, private]

Definition at line 283 of file FesaLogger.h.

Referenced by getLogger().

UdpLogger * fesa::FesaLogger::pUDPLog_ = NULL [static, private]

Definition at line 251 of file FesaLogger.h.

Referenced by destroy(), reinit(), send(), setDiagnosticMode(), and fesa::FesaLoggerBuffer::sync().

const std::string fesa::FesaLogger::usrSender = "USR" [static]

Definition at line 88 of file FesaLogger.h.


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1