26 #ifndef __TERRALIB_COMMON_INTERNAL_LOGGER_H 27 #define __TERRALIB_COMMON_INTERNAL_LOGGER_H 30 #include "../BuildConfig.h" 43 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_FATAL_ENABLED) 44 #define TE_LOG_FATAL(msg) te::common::Logger::logFatal(TERRALIB_LOGGER_DEFAULT_NAME, msg) 46 #define TE_LOG_FATAL(msg) ((void)0) 59 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_ASSERT_ENABLED) 60 #define TE_LOG_ASSERT(condition, msg) te::common::Logger::logAssert(TERRALIB_LOGGER_DEFAULT_NAME, condition, msg) 62 #define TE_LOG_ASSERT(condition, msg) ((void)0) 74 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_ERROR_ENABLED) 75 #define TE_LOG_ERROR(msg) te::common::Logger::logError(TERRALIB_LOGGER_DEFAULT_NAME, msg) 77 #define TE_LOG_ERROR(msg) ((void)0) 89 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_WARN_ENABLED) 90 #define TE_LOG_WARN(msg) te::common::Logger::logWarning(TERRALIB_LOGGER_DEFAULT_NAME, msg) 92 #define TE_LOG_WARN(msg) ((void)0) 104 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_INFO_ENABLED) 105 #define TE_LOG_INFO(msg) te::common::Logger::logInfo(TERRALIB_LOGGER_DEFAULT_NAME, msg) 107 #define TE_LOG_INFO(msg) ((void)0) 119 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_DEBUG_ENABLED) 120 #define TE_LOG_DEBUG(msg) te::common::Logger::logDebug(TERRALIB_LOGGER_DEFAULT_NAME, msg) 122 #define TE_LOG_DEBUG(msg) ((void)0) 134 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_TRACE_ENABLED) 135 #define TE_LOG_TRACE(msg) te::common::Logger::logTrace(TERRALIB_LOGGER_DEFAULT_NAME, msg) 137 #define TE_LOG_TRACE(msg) ((void)0) 149 #define TERRALIB_LOGGER_DEFAULT_NAME "terralib" 156 #define TERRALIB_LOGGER_DEFAULT_CONFIGURATION_FILE "share/terralib/config/te-log.conf" 165 #define TERRALIB_LOGGER_DEFAULT_CONFIG_FILE_TYPE te::common::LOGGER_TXT_CONFIG 167 #ifdef TERRALIB_LOGGER_ENABLED 229 static void initialize(
const std::string& loggerName,
231 const std::string& fileName);
240 static void initialize(
const std::string& loggerName);
247 static void finalize(
const std::string& loggerName);
268 static void logFatal(
const char* logger,
const char* msg);
280 static void logFatal(
const std::string& logger,
const std::string& msg);
293 static void logAssert(
const char* logger,
bool condition,
const char* msg);
305 static void logError(
const char* logger,
const char* msg);
317 static void logWarning(
const char* logger,
const char* msg);
329 static void logInfo(
const char* logger,
const char* msg);
341 static void logInfo(
const std::string& logger,
const std::string& msg);
353 static void logDebug(
const char* logger,
const char* msg);
365 static void logTrace(
const char* logger,
const char* msg);
377 static void logTrace(
const std::string& logger,
const std::string& msg);
397 #endif // TERRALIB_LOGGER_ENABLED 399 #endif // __TERRALIB_COMMON_INTERNAL_LOGGER_H Configuration flags for the TerraLib Common Runtime module.
A base type for static classes.
LoggerConfigurationType
Each enumerated type tells TerraLib how the configuration is done for a logger.
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.