EMANE  1.2.1
EMANE::LogServiceProvider Class Referenceabstract

Log service provider interface. More...

#include <logserviceprovider.h>

Inheritance diagram for EMANE::LogServiceProvider:
EMANE::LogService

Public Types

enum  { MAX_LOG_LENGTH = 1024 }
 

Public Member Functions

virtual ~LogServiceProvider ()
 
virtual void log (LogLevel level, const char *fmt,...) __attribute__((format(printf
 
virtual void virtual void vlog (LogLevel level, const char *fmt, va_list ap)=0
 
virtual void log (LogLevel level, const Strings &strings)=0
 
template<typename Function >
void logfn (LogLevel level, Function fn)
 
template<typename Function >
void logfn (LogLevel level, Function fn, const char *fmt, va_list ap)
 
template<typename Function >
void logfn (LogLevel level, Function fn, const char *fmt,...) __attribute__((format(printf
 

Protected Member Functions

 LogServiceProvider ()
 
virtual bool isLogAllowed (LogLevel level) const =0
 
virtual void log_i (LogLevel level, const Strings &strings)=0
 

Detailed Description

Log service provider interface.

Definition at line 59 of file logserviceprovider.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_LOG_LENGTH 

Definition at line 125 of file logserviceprovider.h.

Constructor & Destructor Documentation

◆ ~LogServiceProvider()

virtual EMANE::LogServiceProvider::~LogServiceProvider ( )
inlinevirtual

Definition at line 62 of file logserviceprovider.h.

◆ LogServiceProvider()

EMANE::LogServiceProvider::LogServiceProvider ( )
inlineprotected

Definition at line 128 of file logserviceprovider.h.

Member Function Documentation

◆ isLogAllowed()

virtual bool EMANE::LogServiceProvider::isLogAllowed ( LogLevel  level) const
protectedpure virtual

◆ log() [1/2]

virtual void EMANE::LogServiceProvider::log ( LogLevel  level,
const char *  fmt,
  ... 
)
virtual

Output a log message

Parameters
levelLog level of the message
fmtformat string (see printf)
...Variable data (see printf)

Reimplemented in EMANE::LogService.

◆ log() [2/2]

virtual void EMANE::LogServiceProvider::log ( LogLevel  level,
const Strings strings 
)
pure virtual

Output a log message

Parameters
levelLog level of the message
stringsStrings to output

Implemented in EMANE::LogService.

◆ log_i()

virtual void EMANE::LogServiceProvider::log_i ( LogLevel  level,
const Strings strings 
)
protectedpure virtual

◆ logfn() [1/3]

template<typename Function >
void EMANE::LogServiceProvider::logfn ( LogLevel  level,
Function  fn 
)

Output a log message using a callable

Parameters
levelLog level of the message
fnCallable returning Strings

Definition at line 36 of file logserviceprovider.inl.

◆ logfn() [2/3]

template<typename Function >
void EMANE::LogServiceProvider::logfn ( LogLevel  level,
Function  fn,
const char *  fmt,
va_list  ap 
)

Output a log message using a callable

Parameters
levelLog level of the message
fnCallable returning Strings
fmtformat string (see printf)
apVariable argument list data (see vprintf)

Definition at line 46 of file logserviceprovider.inl.

◆ logfn() [3/3]

template<typename Function >
void EMANE::LogServiceProvider::logfn ( LogLevel  level,
Function  fn,
const char *  fmt,
  ... 
)

Output a log message using a callable

Parameters
levelLog level of the message
fnCallable returning Strings
fmtformat string (see printf)

Definition at line 64 of file logserviceprovider.inl.

◆ vlog()

virtual void virtual void EMANE::LogServiceProvider::vlog ( LogLevel  level,
const char *  fmt,
va_list  ap 
)
pure virtual

Output a log message

Parameters
levelLog level of the message
fmtformat string (see printf)
apVariable argument list data (see vprintf)

Implemented in EMANE::LogService.


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