EMANE  1.2.1
EMANE::Application::Logger Class Reference

An instance of the EMANE logger. Provides methods for logger configuration and logging. More...

#include <logger.h>

Public Member Functions

 Logger ()
 
 ~Logger ()
 
void setLogLevel (const LogLevel level)
 
void redirectLogsToFile (const char *filename)
 
void log (LogLevel level, const char *fmt,...) __attribute__((format(printf
 
void void open ()
 

Detailed Description

An instance of the EMANE logger. Provides methods for logger configuration and logging.

Definition at line 51 of file logger.h.

Constructor & Destructor Documentation

◆ Logger()

EMANE::Application::Logger::Logger ( )

Definition at line 40 of file logger.cc.

◆ ~Logger()

EMANE::Application::Logger::~Logger ( )

Definition at line 43 of file logger.cc.

Member Function Documentation

◆ log()

void EMANE::Application::Logger::log ( LogLevel  level,
const char *  fmt,
  ... 
)

Output a log message

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

Definition at line 47 of file logger.cc.

◆ open()

void EMANE::Application::Logger::open ( )

open the logger backend

Definition at line 71 of file logger.cc.

◆ redirectLogsToFile()

void EMANE::Application::Logger::redirectLogsToFile ( const char *  filename)

Redirect logging to file

Parameters
filenamethe name of the destination file

Definition at line 64 of file logger.cc.

◆ setLogLevel()

void EMANE::Application::Logger::setLogLevel ( const LogLevel  level)

Set Log Level

Parameters
levelhighest logging level

Definition at line 57 of file logger.cc.


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