26 #ifndef __TERRALIB_COMMON_INTERNAL_LOGGER_H
27 #define __TERRALIB_COMMON_INTERNAL_LOGGER_H
42 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_FATAL_ENABLED)
43 #define TE_LOG_FATAL(msg) te::common::Logger::logFatal(TERRALIB_LOGGER_DEFAULT_NAME, msg)
45 #define TE_LOG_FATAL(msg) ((void)0)
58 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_ASSERT_ENABLED)
59 #define TE_LOG_ASSERT(condition, msg) te::common::Logger::logAssert(TERRALIB_LOGGER_DEFAULT_NAME, condition, msg)
61 #define TE_LOG_ASSERT(condition, msg) ((void)0)
73 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_ERROR_ENABLED)
74 #define TE_LOG_ERROR(msg) te::common::Logger::logError(TERRALIB_LOGGER_DEFAULT_NAME, msg)
76 #define TE_LOG_ERROR(msg) ((void)0)
88 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_WARN_ENABLED)
89 #define TE_LOG_WARN(msg) te::common::Logger::logWarning(TERRALIB_LOGGER_DEFAULT_NAME, msg)
91 #define TE_LOG_WARN(msg) ((void)0)
103 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_INFO_ENABLED)
104 #define TE_LOG_INFO(msg) te::common::Logger::logInfo(TERRALIB_LOGGER_DEFAULT_NAME, msg)
106 #define TE_LOG_INFO(msg) ((void)0)
118 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_DEBUG_ENABLED)
119 #define TE_LOG_DEBUG(msg) te::common::Logger::logDebug(TERRALIB_LOGGER_DEFAULT_NAME, msg)
121 #define TE_LOG_DEBUG(msg) ((void)0)
133 #if defined(TERRALIB_LOGGER_ENABLED) && defined(TERRALIB_LOGGER_TRACE_ENABLED)
134 #define TE_LOG_TRACE(msg) te::common::Logger::logTrace(TERRALIB_LOGGER_DEFAULT_NAME, msg)
136 #define TE_LOG_TRACE(msg) ((void)0)
148 #define TERRALIB_LOGGER_DEFAULT_NAME "terralib"
155 #define TERRALIB_LOGGER_DEFAULT_CONFIGURATION_FILE "share/terralib/config/te-log.conf"
164 #define TERRALIB_LOGGER_DEFAULT_CONFIG_FILE_TYPE te::common::LOGGER_TXT_CONFIG
166 #ifdef TERRALIB_LOGGER_ENABLED
228 static void initialize(
const std::string& loggerName,
230 const std::string& fileName);
239 static void initialize(
const std::string& loggerName);
246 static void finalize(
const std::string& loggerName);
267 static void logFatal(
const char* logger,
const char* msg);
279 static void logFatal(
const std::string& logger,
const std::string& msg);
292 static void logAssert(
const char* logger,
bool condition,
const char* msg);
304 static void logError(
const char* logger,
const char* msg);
316 static void logWarning(
const char* logger,
const char* msg);
328 static void logInfo(
const char* logger,
const char* msg);
340 static void logInfo(
const std::string& logger,
const std::string& msg);
352 static void logDebug(
const char* logger,
const char* msg);
364 static void logTrace(
const char* logger,
const char* msg);
376 static void logTrace(
const std::string& logger,
const std::string& msg);
396 #endif // TERRALIB_LOGGER_ENABLED
398 #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.