Class to bind to a certain type of logging. More...
#include <LogBinding.h>
Public Types | |
typedef baselib_binding::shared_ptr < Log >::type | LogPtr |
Static Public Member Functions | |
static void | print (const std::stringstream &str) |
static void | print (const char *str) |
static void | printError (const std::stringstream &str) |
static void | printError (const char *str) |
static void | printErrorLn (const std::stringstream &str) |
static void | printErrorLn (const char *str) |
static void | printLn (const std::stringstream &str) |
static void | printLn (const char *str) |
static void | printWarn (const std::stringstream &str) |
static void | printWarn (const char *str) |
static void | printWarnLn (const std::stringstream &str) |
static void | printWarnLn (const char *str) |
Static Public Attributes | |
static LogPtr | Singleton |
Protected Member Functions | |
virtual void | implPrint (const std::stringstream &str)=0 |
virtual void | implPrint (const char *str)=0 |
virtual void | implPrintError (const std::stringstream &str)=0 |
virtual void | implPrintError (const char *str)=0 |
virtual void | implPrintWarn (const std::stringstream &str)=0 |
virtual void | implPrintWarn (const char *str)=0 |
virtual void | printNewLine (bool errorStream)=0 |
Static Private Member Functions | |
static bool | sglOK (const char *msg) |
Static Private Attributes | |
static bool | initSglWarningPrinted = false |
Class to bind to a certain type of logging.
Definition at line 36 of file LogBinding.h.
typedef baselib_binding::shared_ptr<Log>::type logger_binding::Log::LogPtr |
Definition at line 39 of file LogBinding.h.
virtual void logger_binding::Log::implPrint | ( | const std::stringstream & | str | ) | [protected, pure virtual] |
Implemented in logger_binding::StdLog, and logger_binding::ROSLog.
virtual void logger_binding::Log::implPrint | ( | const char * | str | ) | [protected, pure virtual] |
Implemented in logger_binding::StdLog, and logger_binding::ROSLog.
virtual void logger_binding::Log::implPrintError | ( | const std::stringstream & | str | ) | [protected, pure virtual] |
Implemented in logger_binding::StdLog, and logger_binding::ROSLog.
virtual void logger_binding::Log::implPrintError | ( | const char * | str | ) | [protected, pure virtual] |
Implemented in logger_binding::StdLog, and logger_binding::ROSLog.
virtual void logger_binding::Log::implPrintWarn | ( | const std::stringstream & | str | ) | [protected, pure virtual] |
Implemented in logger_binding::StdLog, and logger_binding::ROSLog.
virtual void logger_binding::Log::implPrintWarn | ( | const char * | str | ) | [protected, pure virtual] |
Implemented in logger_binding::StdLog, and logger_binding::ROSLog.
static void logger_binding::Log::print | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 41 of file LogBinding.h.
static void logger_binding::Log::print | ( | const char * | str | ) | [inline, static] |
Definition at line 54 of file LogBinding.h.
static void logger_binding::Log::printError | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 45 of file LogBinding.h.
static void logger_binding::Log::printError | ( | const char * | str | ) | [inline, static] |
Definition at line 58 of file LogBinding.h.
static void logger_binding::Log::printErrorLn | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 75 of file LogBinding.h.
static void logger_binding::Log::printErrorLn | ( | const char * | str | ) | [inline, static] |
Definition at line 100 of file LogBinding.h.
static void logger_binding::Log::printLn | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 67 of file LogBinding.h.
static void logger_binding::Log::printLn | ( | const char * | str | ) | [inline, static] |
Definition at line 92 of file LogBinding.h.
virtual void logger_binding::Log::printNewLine | ( | bool | errorStream | ) | [protected, pure virtual] |
Subclasses which do NOT automatically make a new line in implPrint* functions need to implement the printing of a new line in this function.
errorStream | set to true if the new line is to be printed in the error stream. Otherwise is printed to the standard stream. |
Implemented in logger_binding::StdLog, and logger_binding::ROSLog.
static void logger_binding::Log::printWarn | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 49 of file LogBinding.h.
static void logger_binding::Log::printWarn | ( | const char * | str | ) | [inline, static] |
Definition at line 62 of file LogBinding.h.
static void logger_binding::Log::printWarnLn | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 83 of file LogBinding.h.
static void logger_binding::Log::printWarnLn | ( | const char * | str | ) | [inline, static] |
Definition at line 108 of file LogBinding.h.
static bool logger_binding::Log::sglOK | ( | const char * | msg | ) | [inline, static, private] |
If singleton is NULL, prints the message on std::cout and only once prints a warning that Singleton is not inisialized. If singleton is not NULL, this method just returns true.
Definition at line 141 of file LogBinding.h.
bool logger_binding::Log::initSglWarningPrinted = false [static, private] |
Definition at line 155 of file LogBinding.h.
Implementation of methods for logging
Copyright (C) 2016 Jennifer Buehler
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Definition at line 117 of file LogBinding.h.