../client \
../server \
../cli \
+ ../libs \
mainpage.md
# This tag can be used to specify the character encoding of the source files
# also VERBATIM_HEADERS is set to NO.
# The default value is: NO.
-SOURCE_BROWSER = YES
+SOURCE_BROWSER = NO
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
# classes and enums directly into the documentation.
# function all documented functions referencing it will be listed.
# The default value is: NO.
-REFERENCED_BY_RELATION = YES
+REFERENCED_BY_RELATION = NO
# If the REFERENCES_RELATION tag is set to YES then for each documented function
# all documented entities called/used by that function will be listed.
# The default value is: NO.
-REFERENCES_RELATION = YES
+REFERENCES_RELATION = NO
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
/**
* @file
- * @author Jan Olszak (j.olszak@samsung.com)
- * @brief Logger
+ * @author Jan Olszak (j.olszak@samsung.com)
+ * @defgroup libLogger libLogger
+ * @brief C++ library for handling logging.
+ *
+ * There are few backends implemented and it's possible to create your own by inheriting after the @ref logger::LogBackend interface.
+ *
+ * Example usage:
+ * @code
+ * using namespace logger;
+ *
+ * // Set minimal logging level
+ * Logger::setLogLevel("TRACE");
+ *
+ *
+ * // Set one of the possible backends:
+ * Logger::setLogBackend(new NullLogger());
+ * Logger::setLogBackend(new SystemdJournalBackend());
+ * Logger::setLogBackend(new FileBackend("/tmp/logs.txt"));
+ * Logger::setLogBackend(new SyslogBackend());
+ * Logger::setLogBackend(new StderrBackend());
+ *
+ *
+ * // All logs should be visible:
+ * LOGE("Error");
+ * LOGW("Warning");
+ * LOGI("Information");
+ * LOGD("Debug");
+ * LOGT("Trace");
+ * LOGH("Helper");
+ *
+ * {
+ * LOGS("Scope");
+ * }
+ *
+ * @endcode
*/
+
#ifndef COMMON_LOGGER_LOGGER_HPP
#define COMMON_LOGGER_LOGGER_HPP
} // namespace logger
+/*@{*/
+/// @brief Generic logging macro
#define LOG(SEVERITY, MESSAGE) \
do { \
if (logger::Logger::getLogLevel() <= logger::LogLevel::SEVERITY) { \
} \
} while (0)
+
+/// Logging errors
#define LOGE(MESSAGE) LOG(ERROR, MESSAGE)
+
+/// Logging warnings
#define LOGW(MESSAGE) LOG(WARN, MESSAGE)
+
+/// Logging information
#define LOGI(MESSAGE) LOG(INFO, MESSAGE)
+
+/// Logging debug information
#define LOGD(MESSAGE) LOG(DEBUG, MESSAGE)
+
+/// Logging helper information (for debugging purposes)
#define LOGH(MESSAGE) LOG(HELP, MESSAGE)
+
+/// Logging tracing information
#define LOGT(MESSAGE) LOG(TRACE, MESSAGE)
#endif // COMMON_LOGGER_LOGGER_HPP
+/*@}*/
\ No newline at end of file