#include "blocxx/BLOCXX_config.h"
#include "blocxx/CommonFwd.hpp"
#include "blocxx/String.hpp"
#include "blocxx/StringStream.hpp"
#include "blocxx/LogConfig.hpp"
#include "blocxx/IntrusiveCountableBase.hpp"
#include "blocxx/Exception.hpp"
#include <errno.h>
Go to the source code of this file.
Namespaces | |
namespace | BLOCXX_NAMESPACE |
Classes | |
class | BLOCXX_NAMESPACE::LoggerException |
class | BLOCXX_NAMESPACE::Logger |
Logging interface. More... | |
Defines | |
#define | BLOCXX_LOGGER_PRETTY_FUNCTION "" |
#define | BLOCXX_LOG_DEBUG(logger, message) |
Log message to logger with the Debug level. | |
#define | BLOCXX_LOG_INFO(logger, message) |
Log message to logger with the Info level. | |
#define | BLOCXX_LOG_ERROR(logger, message) |
Log message to logger with the Error level. | |
#define | BLOCXX_LOG_FATAL_ERROR(logger, message) |
Log message to logger with the FatalError level. | |
#define | BLOCXX_LOG(logger, category, message) |
Log message to logger with the specified category. | |
#define | BLOCXX_SLOG_DEBUG(logger, message) |
Log message to logger with the Debug level. | |
#define | BLOCXX_SLOG_INFO(logger, message) |
Log message to logger with the Info level. | |
#define | BLOCXX_SLOG_ERROR(logger, message) |
Log message to logger with the Error level. | |
#define | BLOCXX_SLOG_FATAL_ERROR(logger, message) |
Log message to logger with the FatalError level. | |
#define | BLOCXX_SLOG(logger, category, message) |
Log message to logger with the specified category. |
|
Value: do \ { \ int err = errno; \ if ((logger)->categoryIsEnabled((category))) \ { \ (logger)->logMessage((category), (message), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) The message expression is only evaluated if logger->categoryIsEnabled(category) == true, __FILE__ and __LINE__ are logged.
Definition at line 446 of file Logger.hpp. |
|
Value: do \ { \ int err = errno; \ if ((logger)->getLogLevel() >= ::BLOCXX_NAMESPACE::E_DEBUG_LEVEL) \ { \ (logger)->logMessage(::BLOCXX_NAMESPACE::Logger::STR_DEBUG_CATEGORY, (message), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) The message expression is only evaluated if logger->getLogLevel() >= E_DEBUG_LEVEL, __FILE__ and __LINE__ are logged.
Definition at line 374 of file Logger.hpp. |
|
Value: do \ { \ int err = errno; \ if ((logger)->getLogLevel() >= ::BLOCXX_NAMESPACE::E_ERROR_LEVEL) \ { \ (logger)->logMessage(::BLOCXX_NAMESPACE::Logger::STR_ERROR_CATEGORY, (message), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) The message expression is only evaluated if logger->getLogLevel() >= E_ERROR_LEVEL, __FILE__ and __LINE__ are logged.
Definition at line 410 of file Logger.hpp. Referenced by BLOCXX_NAMESPACE::dlSharedLibraryLoader::loadSharedLibrary(). |
|
Value: do \ { \ int err = errno; \ if ((logger)->getLogLevel() >= ::BLOCXX_NAMESPACE::E_FATAL_ERROR_LEVEL) \ { \ (logger)->logMessage(::BLOCXX_NAMESPACE::Logger::STR_FATAL_CATEGORY, (message), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) The message expression is always evaluated, __FILE__ and __LINE__ are logged.
Definition at line 427 of file Logger.hpp. |
|
Value: do \ { \ int err = errno; \ if ((logger)->getLogLevel() >= ::BLOCXX_NAMESPACE::E_INFO_LEVEL) \ { \ (logger)->logMessage(::BLOCXX_NAMESPACE::Logger::STR_INFO_CATEGORY, (message), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) The message expression is only evaluated if logger->getLogLevel() >= E_INFO_LEVEL, __FILE__ and __LINE__ are logged.
Definition at line 392 of file Logger.hpp. |
|
Definition at line 364 of file Logger.hpp. |
|
Value: do \ { \ int err = errno; \ if ((logger)->categoryIsEnabled((category))) \ { \ OStringStream buf; \ buf << message; \ (logger)->logMessage((category), buf.toString(), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) This macro variant allows to use a stream operator<< to construct the message, e.g. BLOCXX_SLOG(logger, "INFO", "Msg Nr" << 42); The message parameter is only evaluated if logger->categoryIsEnabled(category) == true, __FILE__ and __LINE__ are logged.
Definition at line 560 of file Logger.hpp. |
|
Value: do \ { \ int err = errno; \ if ((logger)->getLogLevel() >= ::BLOCXX_NAMESPACE::E_DEBUG_LEVEL) \ { \ OStringStream buf; \ buf << message; \ (logger)->logMessage(::BLOCXX_NAMESPACE::Logger::STR_DEBUG_CATEGORY, buf.toString(), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) This macro variant allows to use a stream operator<< to construct the message, e.g. BLOCXX_SLOG_DEBUG(logger, "Msg Nr" << 42); The message parameter is only evaluated if logger->getLogLevel() >= E_DEBUG_LEVEL, __FILE__ and __LINE__ are logged.
Definition at line 468 of file Logger.hpp. |
|
Value: do \ { \ int err = errno; \ if ((logger)->getLogLevel() >= ::BLOCXX_NAMESPACE::E_ERROR_LEVEL) \ { \ OStringStream buf; \ buf << message; \ (logger)->logMessage(::BLOCXX_NAMESPACE::Logger::STR_ERROR_CATEGORY, buf.toString(), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) This macro variant allows to use a stream operator<< to construct the message, e.g. BLOCXX_SLOG_ERROR(logger, "Msg Nr" << 42);. The message parameter is only evaluated if logger->getLogLevel() >= E_ERROR_LEVEL, __FILE__ and __LINE__ are logged.
Definition at line 514 of file Logger.hpp. |
|
Value: do \ { \ int err = errno; \ if ((logger)->getLogLevel() >= ::BLOCXX_NAMESPACE::E_FATAL_ERROR_LEVEL) \ { \ OStringStream buf; \ buf << message; \ (logger)->logMessage(::BLOCXX_NAMESPACE::Logger::STR_FATAL_CATEGORY, buf.toString(), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) This macro variant allows to use a stream operator<< to construct the message, e.g. BLOCXX_SLOG_FATAL_ERROR(logger, "Msg Nr" << 42);. The message parameter is always evaluated, __FILE__ and __LINE__ are logged.
Definition at line 536 of file Logger.hpp. |
|
Value: do \ { \ int err = errno; \ if ((logger)->getLogLevel() >= ::BLOCXX_NAMESPACE::E_INFO_LEVEL) \ { \ OStringStream buf; \ buf << message; \ (logger)->logMessage(::BLOCXX_NAMESPACE::Logger::STR_INFO_CATEGORY, buf.toString(), __FILE__, __LINE__, BLOCXX_LOGGER_PRETTY_FUNCTION); \ } \ errno = err; \ } while (0) This macro variant allows to use a stream operator<< to construct the message, e.g. BLOCXX_SLOG_INFO(logger, "Msg Nr" << 42);. The message parameter is only evaluated if logger->getLogLevel() >= E_INFO_LEVEL, __FILE__ and __LINE__ are logged.
Definition at line 491 of file Logger.hpp. |