ADBLib  0.5
A simple library for rapid robot code development
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Pages
ADBLib::Logger Class Reference

Static logging class allowing for global access to logging capabilities without a whole lot of annoyances. More...

#include <Logger.h>

Collaboration diagram for ADBLib::Logger:

Public Member Functions

 Logger ()
 

Static Public Member Functions

static void log (string message, string name, logFlag flag=info)
 Logs a message to the log designated log. More...
 
static void newLog (string name, string filename)
 Creates a new log with the given name and filename. More...
 
static LoggetLog (string name)
 Gets a pointer to a log of the given name. More...
 
static void flushLogBuffers ()
 Flush all log buffers, outputting ALL logs to text. More...
 

Static Private Attributes

static unordered_map< string, LoglogFiles
 

Detailed Description

Static logging class allowing for global access to logging capabilities without a whole lot of annoyances.

Constructor & Destructor Documentation

ADBLib::Logger::Logger ( )

Member Function Documentation

void ADBLib::Logger::flushLogBuffers ( )
static

Flush all log buffers, outputting ALL logs to text.

Log * ADBLib::Logger::getLog ( string  name)
static

Gets a pointer to a log of the given name.

Parameters
nameThe name of the log.
Returns
Pointer to the log object. Returns nullptr if the log does not exist.
void ADBLib::Logger::log ( string  message,
string  name,
logFlag  flag = info 
)
static

Logs a message to the log designated log.

Parameters
messageThe message to log.
flagThe flag of the message.
nameThe name of the log to log to.

Here is the call graph for this function:

Here is the caller graph for this function:

void ADBLib::Logger::newLog ( string  name,
string  filename 
)
static

Creates a new log with the given name and filename.

Parameters
nameThe name of the log to create.
filenameThe file to write to.
Note
Don't forget a leading '/' on the filename.

Here is the caller graph for this function:

Member Data Documentation

unordered_map< string, Log > ADBLib::Logger::logFiles
staticprivate

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