Classes | Namespaces | Defines | Functions
LogBinding.h File Reference
#include <string>
#include <iostream>
#include <sstream>
#include <baselib_binding/SharedPtr.h>
Include dependency graph for LogBinding.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  logger_binding::Log
 Class to bind to a certain type of logging. More...
class  logger_binding::StdLog
 Simple implementation of a log which just prints the logs on std::cout and std::cerr. More...

Namespaces

namespace  logger_binding

Defines

#define PRINT_INIT_STD()
#define PRINTDEBUG(msg)
#define PRINTERROR(msg)
#define PRINTMSG(msg)
#define PRINTWARN(msg)

Functions

std::string getFileDirectory (const std::string &pathToFile)
std::string getFilenameFromPath (const std::string &path)

Define Documentation

#define PRINT_INIT_STD ( )
Value:
{\
    if (logger_binding::Log::Singleton) \
    {\
        std::cerr << "Singleton already set, overwriting!" << std::endl;\
    }\
    logger_binding::Log::Singleton = SHARED_PTR<logger_binding::Log>(new logger_binding::StdLog()); \
}

Definition at line 208 of file LogBinding.h.

#define PRINTDEBUG (   msg)
Value:
{\
    std::stringstream _str_; \
    _str_ << msg << " - "<< getFilenameFromPath(__FILE__) << ", " << __LINE__; \
    logger_binding::Log::printLn(_str_); \
}

Definition at line 225 of file LogBinding.h.

#define PRINTERROR (   msg)
Value:
{\
    std::stringstream _str_; \
    _str_ << msg << " - "<< getFilenameFromPath(__FILE__) << ", " << __LINE__; \
    logger_binding::Log::printErrorLn(_str_); \
}

Definition at line 232 of file LogBinding.h.

#define PRINTMSG (   msg)
Value:
{\
    std::stringstream _str_; \
    _str_ << msg << " - "<< getFilenameFromPath(__FILE__) << ", " << __LINE__; \
    logger_binding::Log::printLn(_str_); \
}

Definition at line 218 of file LogBinding.h.

#define PRINTWARN (   msg)
Value:
{\
    std::stringstream _str_; \
    _str_ << msg << " - "<< getFilenameFromPath(__FILE__) << ", " << __LINE__; \
    logger_binding::Log::printWarnLn(_str_); \
}

Definition at line 239 of file LogBinding.h.


Function Documentation

std::string getFileDirectory ( const std::string &  pathToFile)

Definition at line 41 of file LogBinding.cpp.

std::string getFilenameFromPath ( const std::string &  path)

Definition at line 30 of file LogBinding.cpp.



logger_binding
Author(s): Jennifer Buehler
autogenerated on Sat Mar 2 2019 03:21:43